condition: when reading /etc/ modification timestamp, let's actualy compare it as-is

Previously, we'd only compare the nsec component of it, which sounds
needlessly fragile. Let's instead compare the timestamp as it is.
This commit is contained in:
Lennart Poettering 2020-05-14 09:27:59 +02:00
parent f33cd69b5c
commit b2d1ad757c
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ static int condition_test_needs_update(Condition *c, char **env) {
return true;
}
timespec_store(&other.st_mtim, timestamp);
return timespec_load_nsec(&usr.st_mtim) > timestamp;
}
return usr.st_mtim.tv_nsec > other.st_mtim.tv_nsec;