[BusyBox-cvs] busybox/archival/libunarchive data_extract_all.c, 1.14, 1.15

Glenn McGrath bug1 at busybox.net
Thu Nov 20 08:00:46 UTC 2003


Update of /var/cvs/busybox/archival/libunarchive
In directory winder:/tmp/cvs-serv21225/archival/libunarchive

Modified Files:
	data_extract_all.c 
Log Message:
Dont attempt to unlink directories


Index: data_extract_all.c
===================================================================
RCS file: /var/cvs/busybox/archival/libunarchive/data_extract_all.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- data_extract_all.c	15 Nov 2003 23:44:31 -0000	1.14
+++ data_extract_all.c	20 Nov 2003 08:00:38 -0000	1.15
@@ -42,7 +42,7 @@
 	/* 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");
 		}
 	}




More information about the busybox-cvs mailing list