This commit is contained in:
Simon Kelley
2015-02-14 20:02:37 +00:00
parent ee4d1cea92
commit 8ff70de618

View File

@@ -104,7 +104,8 @@ void set_dynamic_inotify(int flag, int total_size, struct crec **rhash, int revh
ah->wd = inotify_add_watch(daemon->inotifyfd, ah->fname, IN_CLOSE_WRITE | IN_MOVED_TO); ah->wd = inotify_add_watch(daemon->inotifyfd, ah->fname, IN_CLOSE_WRITE | IN_MOVED_TO);
ah->flags |= AH_WD_DONE; ah->flags |= AH_WD_DONE;
} }
/* Read contents of dir _after_ calling add_watch, in the ho[e of avoiding
/* Read contents of dir _after_ calling add_watch, in the hope of avoiding
a race which misses files being added as we start */ a race which misses files being added as we start */
if (ah->wd == -1 || !(dir_stream = opendir(ah->fname))) if (ah->wd == -1 || !(dir_stream = opendir(ah->fname)))
{ {