svn commit: trunk/busybox/archival

vda at busybox.net vda at busybox.net
Fri Jun 27 15:52:07 UTC 2008


Author: vda
Date: 2008-06-27 08:52:07 -0700 (Fri, 27 Jun 2008)
New Revision: 22536

Log:
cpio: fix -m to actually work as expected (Pascal Bellard)

function                                             old     new   delta
cpio_main                                           1140    1153     +13



Modified:
   trunk/busybox/archival/cpio.c


Changeset:
Modified: trunk/busybox/archival/cpio.c
===================================================================
--- trunk/busybox/archival/cpio.c	2008-06-27 15:48:45 UTC (rev 22535)
+++ trunk/busybox/archival/cpio.c	2008-06-27 15:52:07 UTC (rev 22536)
@@ -204,7 +204,7 @@
 	archive_handle = init_handle();
 	archive_handle->src_fd = STDIN_FILENO;
 	archive_handle->seek = seek_by_read;
-	archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE;
+	archive_handle->flags = ARCHIVE_EXTRACT_NEWER;
 
 #if ENABLE_FEATURE_CPIO_O
 	opt = getopt32(argv, "ituvF:dmoH:", &cpio_filename, &cpio_fmt);
@@ -258,6 +258,9 @@
 	if (opt & CPIO_OPT_CREATE_LEADING_DIR) {
 		archive_handle->flags |= ARCHIVE_CREATE_LEADING_DIRS;
 	}
+	if (opt & CPIO_OPT_PRESERVE_MTIME) {
+		archive_handle->flags |= ARCHIVE_PRESERVE_DATE;
+	}
 
 	while (*argv) {
 		archive_handle->filter = filter_accept_list;




More information about the busybox-cvs mailing list