chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path: always look for IN_ATTRIB since deletion is signalled that way
[elogind.git]
/
src
/
path.c
diff --git
a/src/path.c
b/src/path.c
index f62157e80184260a4a04f1a73177a7dea8a9cc2f..3e2856920338d1db3216f2ee98b079a4e9a48200 100644
(file)
--- a/
src/path.c
+++ b/
src/path.c
@@
-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] = {
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_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;
};
bool exists = false;
@@
-221,9
+221,9
@@
static int path_watch_one(Path *p, PathSpec *s) {
*slash = 0;
*slash = 0;
- flags = IN_DELETE_SELF|IN_MOVE_SELF;
+ flags = IN_DELETE_SELF|IN_MOVE_SELF
|IN_ATTRIB
;
if (!exists)
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;
if (inotify_add_watch(s->inotify_fd, k, flags) >= 0)
exists = true;