aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-01-23 05:30:00 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-01-23 05:30:00 +0000
commit06b8084b2cf9308fe0cbbcdde0741a881b7609fb (patch)
treed5e4b91c5efa955bcb85bfa918f269c365a675c4 /src
parente3d0fe06bd566b659a7c36b5d9892c6f6b9caa89 (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')
-rw-r--r--src/rc/checkpath.c2
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 */