monitor: Fix directory symlink deletion handling

When a symlink to a direcotry is deleted inotify cannot tell it from a
regular file rendering all its children orphans.
This sometimes leads to an unexpected effect - they may appear later in
a newly created directory when it gets an id used by the deleted symlink.
This commit is contained in:
Georgy Kibardin
2023-05-19 20:05:50 +03:00
committed by Justin Maggard
parent 0a6e10e821
commit c5c4d9e169
3 changed files with 25 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
int monitor_insert_file(const char *name, const char *path);
int monitor_insert_directory(int fd, char *name, const char * path);
int monitor_remove_file(const char * path);
int monitor_remove_tree(const char * path);
int monitor_remove_directory(int fd, const char * path);
#if defined(HAVE_INOTIFY) || defined(HAVE_KQUEUE)