diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-01-23 05:30:00 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-01-23 05:30:00 +0000 |
commit | 06b8084b2cf9308fe0cbbcdde0741a881b7609fb (patch) | |
tree | d5e4b91c5efa955bcb85bfa918f269c365a675c4 /src/rc | |
parent | e3d0fe06bd566b659a7c36b5d9892c6f6b9caa89 (diff) |
Ensure that when -F is passed, existing files are truncated properly.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/checkpath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c index 0aee4465..86623d94 100644 --- a/src/rc/checkpath.c +++ b/src/rc/checkpath.c @@ -61,7 +61,7 @@ do_check(char *path, uid_t uid, gid_t gid, mode_t mode, inode_t type, bool trunc struct stat st; int fd, flags; - if (stat(path, &st)) { + if (stat(path, &st) || trunc) { if (type == inode_file) { einfo("%s: creating file", path); if (!mode) /* 664 */ |