diff options
author | Tom Gundersen <teg@jklm.no> | 2015-11-11 23:14:12 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-11-11 23:14:12 +0100 |
commit | fb5c8184a99ed3379d6a48eed2b83f6f7ee9ee18 (patch) | |
tree | f8144b0ba312e12a221ec9b1c0f7f937fb5aec9d /src/basic/fs-util.c | |
parent | a9ae08421eac6080d68c03c503c1673eea9f37b3 (diff) | |
parent | ee735086f8670be1591fa9593e80dd60163a7a2f (diff) |
Merge pull request #1854 from poettering/unit-deps
Dependency engine improvements
Diffstat (limited to 'src/basic/fs-util.c')
-rw-r--r-- | src/basic/fs-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index 7aee404bfc..cddd4232fc 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -311,7 +311,7 @@ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi if (fd < 0) return -errno; - if (mode > 0) { + if (mode != MODE_INVALID) { r = fchmod(fd, mode); if (r < 0) return -errno; @@ -338,7 +338,7 @@ int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gi } int touch(const char *path) { - return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, 0); + return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID); } int symlink_idempotent(const char *from, const char *to) { |