BusyBox tar skips first file when doing named extraction
Jim Gleason
jimg at lineo.com
Wed Nov 8 00:17:55 UTC 2000
Package: busybox
Version: v0.48pre
Severity: normal
When busybox tar is told which files to extract, it skips the first file
specified ("a" in this example):
tar -xvf FILE.tar a b c
The patch for this bug is shown below (basically we don't use optind
which is always "1" at the time this code is executed).
diff -u -b -B -p -r1.69 tar.c
--- tar.c 2000/10/09 17:54:38 1.69
+++ tar.c 2000/11/08 00:02:36
@@ -240,7 +240,7 @@ extern int tar_main(int argc, char **arg
#endif
}
if (listFlag == TRUE || extractFlag == TRUE) {
- exit(readTarFile(tarName, extractFlag, listFlag, tostdoutFlag,
verboseFlag, &argv[optind], excludeList));
+ exit(readTarFile(tarName, extractFlag, listFlag, tostdoutFlag,
verboseFlag, argv, excludeList));
}
flagError:
---------------------------------------
Received: (at 1075-close) by bugs.lineo.com; 8 Nov 2000 01:13:22 +0000
More information about the busybox
mailing list