mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-10 00:58:20 +03:00
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:
parent
f33cd69b5c
commit
b2d1ad757c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user