projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
923dd79
)
unlink a previous file before its extracted
author
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 21 Apr 2003 11:03:29 +0000
(11:03 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 21 Apr 2003 11:03:29 +0000
(11:03 -0000)
archival/libunarchive/data_extract_all.c
patch
|
blob
|
history
diff --git
a/archival/libunarchive/data_extract_all.c
b/archival/libunarchive/data_extract_all.c
index 77b4de593edda5f235663d43c13c5ff87725768e..bd264dd749884d518d9f92c62b601a54cdb46f13 100644
(file)
--- a/
archival/libunarchive/data_extract_all.c
+++ b/
archival/libunarchive/data_extract_all.c
@@
-53,7
+53,8
@@
extern void data_extract_all(archive_handle_t *archive_handle)
#endif
{
/* Regular file */
- dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT);
+ unlink(file_header->name);
+ dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT | O_EXCL);
archive_copy_file(archive_handle, dst_fd);
close(dst_fd);
}