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:
0413af0
)
Dont attempt to unlink directories
author
Glenn L McGrath
<bug1@ihug.co.nz>
Thu, 20 Nov 2003 08:00:38 +0000
(08:00 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Thu, 20 Nov 2003 08:00:38 +0000
(08:00 -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 1a6b6244bddeaed6be1bb9cd866107c2f80ea4a4..4dccb815dc4bd2cadb5c6006f12bb26f472592dd 100644
(file)
--- a/
archival/libunarchive/data_extract_all.c
+++ b/
archival/libunarchive/data_extract_all.c
@@
-42,7
+42,7
@@
extern void data_extract_all(archive_handle_t *archive_handle)
/* Check if the file already exists */
if (archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) {
/* Remove the existing entry if it exists */
- if ((unlink(file_header->name) == -1) && (errno != ENOENT)) {
+ if ((
(file_header->mode & S_IFMT) != S_IFDIR) && (
unlink(file_header->name) == -1) && (errno != ENOENT)) {
bb_perror_msg_and_die("Couldnt remove old file");
}
}