1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

path: always look for IN_ATTRIB since deletion is signalled that way

This commit is contained in:
Lennart Poettering 2010-11-15 00:47:29 +01:00
parent 6210e7fc31
commit 782195a3c3
2 changed files with 5 additions and 5 deletions

2
TODO
View File

@ -80,7 +80,7 @@
* automatically determine TERM= based on tty name. (TERM=linux vs. TERM=vt100-nav)
* declare /etc/system-release cross-distro standard
* declare /etc/os-release cross-distro standard
Pre v12:

View File

@ -181,9 +181,9 @@ static void path_unwatch_one(Path *p, PathSpec *s) {
static int path_watch_one(Path *p, PathSpec *s) {
static const int flags_table[_PATH_TYPE_MAX] = {
[PATH_EXISTS] = IN_DELETE_SELF|IN_MOVE_SELF,
[PATH_EXISTS] = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB,
[PATH_CHANGED] = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB|IN_CLOSE_WRITE|IN_CREATE|IN_DELETE|IN_MOVED_FROM|IN_MOVED_TO,
[PATH_DIRECTORY_NOT_EMPTY] = IN_DELETE_SELF|IN_MOVE_SELF|IN_CREATE|IN_MOVED_TO
[PATH_DIRECTORY_NOT_EMPTY] = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB|IN_CREATE|IN_MOVED_TO
};
bool exists = false;
@ -221,9 +221,9 @@ static int path_watch_one(Path *p, PathSpec *s) {
*slash = 0;
flags = IN_DELETE_SELF|IN_MOVE_SELF;
flags = IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB;
if (!exists)
flags |= IN_CREATE | IN_MOVED_TO | IN_ATTRIB;
flags |= IN_CREATE | IN_MOVED_TO;
if (inotify_add_watch(s->inotify_fd, k, flags) >= 0)
exists = true;