summaryrefslogtreecommitdiff
path: root/src/path.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2011-12-08 12:09:10 +0100
committerMichal Schmidt <mschmidt@redhat.com>2011-12-08 18:45:38 +0100
commit714d943f72417f53bcb98ed45d002aa270e793c4 (patch)
tree05b136212a66ac396f227ba083377ab6dd2420fc /src/path.c
parent7e115808a990199fe00de4cc2ef48fe96de3d3d0 (diff)
path: add missing pieces for PathModified
PATH_MODIFIED worked internally for PID files detection, but was unusable in units.
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c
index 1e5d825209..3fee24760c 100644
--- a/src/path.c
+++ b/src/path.c
@@ -149,7 +149,8 @@ int pathspec_fd_event(PathSpec *s, uint32_t events) {
while (k > 0) {
size_t step;
- if (s->type == PATH_CHANGED && s->primary_wd == e->wd)
+ if ((s->type == PATH_CHANGED || s->type == PATH_MODIFIED) &&
+ s->primary_wd == e->wd)
r = 1;
step = sizeof(struct inotify_event) + e->len;
@@ -184,7 +185,8 @@ static bool pathspec_check_good(PathSpec *s, bool initial) {
break;
}
- case PATH_CHANGED: {
+ case PATH_CHANGED:
+ case PATH_MODIFIED: {
bool b;
b = access(s->path, F_OK) >= 0;