* Fix inotify detection issue on first-level folders.

This commit is contained in:
Justin Maggard
2011-12-26 10:14:21 +00:00
parent edcdb027d0
commit 0919e28b3a
2 changed files with 19 additions and 16 deletions

View File

@ -592,6 +592,8 @@ inotify_remove_directory(int fd, const char * path)
sqlite_int64 detailID = 0;
int rows, i, ret = 1;
/* Invalidate the scanner cache so we don't insert files into non-existent containers */
valid_cache = 0;
remove_watch(fd, path);
sql = sqlite3_mprintf("SELECT ID from DETAILS where PATH glob '%q/*'"
" UNION ALL SELECT ID from DETAILS where PATH = '%q'", path, path);