aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive/data_extract_all.c
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-11-20 08:00:38 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-11-20 08:00:38 +0000
commit14725135de466662f93cad62f1a8701feace636b (patch)
tree7e813cd75c06e38748da8020e30e45fabac6e896 /archival/libunarchive/data_extract_all.c
parent75262e9a8f3aaabece941a7c0168360043cd474c (diff)
downloadbusybox-w32-14725135de466662f93cad62f1a8701feace636b.tar.gz
busybox-w32-14725135de466662f93cad62f1a8701feace636b.tar.bz2
busybox-w32-14725135de466662f93cad62f1a8701feace636b.zip
Dont attempt to unlink directories
git-svn-id: svn://busybox.net/trunk/busybox@7956 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-rw-r--r--archival/libunarchive/data_extract_all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index 1a6b6244b..4dccb815d 100644
--- 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)
42 /* Check if the file already exists */ 42 /* Check if the file already exists */
43 if (archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) { 43 if (archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) {
44 /* Remove the existing entry if it exists */ 44 /* Remove the existing entry if it exists */
45 if ((unlink(file_header->name) == -1) && (errno != ENOENT)) { 45 if (((file_header->mode & S_IFMT) != S_IFDIR) && (unlink(file_header->name) == -1) && (errno != ENOENT)) {
46 bb_perror_msg_and_die("Couldnt remove old file"); 46 bb_perror_msg_and_die("Couldnt remove old file");
47 } 47 }
48 } 48 }