summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
authorTobias Klauser <klto@zhaw.ch>2009-10-30 17:18:24 +0100
committerTobias Klauser <klto@zhaw.ch>2009-10-30 17:18:24 +0100
commitdd59f4f38a9e6454d8413ba38fc6d8114954ad72 (patch)
tree40cc818e3ca2338234cdf40ee9aacc319883150f /inotail.c
parent727e55497fa03e9312c1e73bea005233aa03c8d6 (diff)
inotail.c: Add TODO comment to handle_inotify_event
Reopening the watch should only be done in FOLLOW_NAME mode.
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c4
1 files changed, 4 insertions, 0 deletions
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",