aboutsummaryrefslogtreecommitdiff
path: root/archival/uncompress.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/uncompress.c')
-rw-r--r--archival/uncompress.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/archival/uncompress.c b/archival/uncompress.c
index c47436ea3..b282fe811 100644
--- a/archival/uncompress.c
+++ b/archival/uncompress.c
@@ -61,11 +61,9 @@ int uncompress_main(int argc, char **argv)
61 *extension = '\0'; 61 *extension = '\0';
62 62
63 /* Open output file */ 63 /* Open output file */
64 dst_fd = bb_xopen(uncompressed_file, O_WRONLY | O_CREAT); 64 xstat(compressed_file, &stat_buf);
65 65 dst_fd = bb_xopen3(uncompressed_file, O_WRONLY | O_CREAT,
66 /* Set permissions on the file */ 66 stat_buf.st_mode);
67 stat(compressed_file, &stat_buf);
68 chmod(uncompressed_file, stat_buf.st_mode);
69 67
70 /* If unzip succeeds remove the old file */ 68 /* If unzip succeeds remove the old file */
71 delete_path = compressed_file; 69 delete_path = compressed_file;