From dd59f4f38a9e6454d8413ba38fc6d8114954ad72 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 30 Oct 2009 17:18:24 +0100 Subject: inotail.c: Add TODO comment to handle_inotify_event Reopening the watch should only be done in FOLLOW_NAME mode. --- inotail.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inotail.c b/inotail.c index de16a60..d1c30d5 100644 --- a/inotail.c +++ b/inotail.c @@ -676,6 +676,10 @@ static int handle_inotify_event(int ifd, struct inotify_event *inev, struct file else fprintf(stderr, "File '%s' moved.\n", f->name); + /* TODO: This should only be done in FOLLOW_NAME mode, also we + * should watch the containing directory until the file + * reappears and only then try to install the new watch + */ f->i_watch = inotify_add_watch(ifd, f->name, INOTAIL_WATCH_MASK); if (f->i_watch < 0) { fprintf(stderr, "Error: Could not create inotify watch on file '%s' (%s)\n", -- cgit v1.2.3-54-g00ecf