summaryrefslogtreecommitdiff
path: root/archival/uncompress.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/uncompress.c')
-rw-r--r--archival/uncompress.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/archival/uncompress.c b/archival/uncompress.c
index ca775c7..8c466eb 100644
--- a/archival/uncompress.c
+++ b/archival/uncompress.c
@@ -55,7 +55,8 @@ int uncompress_main(int argc, char **argv)
/* Open output file */
xstat(compressed_file, &stat_buf);
- dst_fd = xopen3(uncompressed_file, O_WRONLY | O_CREAT,
+ dst_fd = xopen3(uncompressed_file,
+ O_WRONLY | O_CREAT | O_TRUNC,
stat_buf.st_mode);
/* If unzip succeeds remove the old file */