diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-11-20 08:00:38 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-11-20 08:00:38 +0000 |
commit | 90c9df93f3fa9fb9c6b576c92c19bbe36bdc6e52 (patch) | |
tree | 7e813cd75c06e38748da8020e30e45fabac6e896 /archival | |
parent | 0413af0e275ec0f899b2bd4f06af2c43017f8296 (diff) | |
download | busybox-w32-90c9df93f3fa9fb9c6b576c92c19bbe36bdc6e52.tar.gz busybox-w32-90c9df93f3fa9fb9c6b576c92c19bbe36bdc6e52.tar.bz2 busybox-w32-90c9df93f3fa9fb9c6b576c92c19bbe36bdc6e52.zip |
Dont attempt to unlink directories
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libunarchive/data_extract_all.c | 2 |
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 | } |