svn commit: trunk/busybox/archival

landley at busybox.net landley at busybox.net
Thu Sep 1 11:36:22 UTC 2005


Author: landley
Date: 2005-09-01 04:36:21 -0700 (Thu, 01 Sep 2005)
New Revision: 11311

Log:
Fix for bug 383: attempting to "tar c /" would error out because stripping
trailing / turns that into an empty string.


Modified:
   trunk/busybox/archival/tar.c


Changeset:
Modified: trunk/busybox/archival/tar.c
===================================================================
--- trunk/busybox/archival/tar.c	2005-09-01 10:23:57 UTC (rev 11310)
+++ trunk/busybox/archival/tar.c	2005-09-01 11:36:21 UTC (rev 11311)
@@ -795,7 +795,7 @@
 	/* TODO: This is the same as in ar, separate function ? */
 	while (optind < argc) {
 		char *filename_ptr = last_char_is(argv[optind], '/');
-		if (filename_ptr) {
+		if (filename_ptr > argv[optind]) {
 			*filename_ptr = '\0';
 		}
 		tar_handle->accept = llist_add_to(tar_handle->accept, argv[optind]);




More information about the busybox-cvs mailing list