[BusyBox] [patch] fix for "tar -C broken in 1.0pre3"
Rob Landley
rob at landley.net
Thu Oct 2 01:07:39 UTC 2003
Apply this patch to fix the problem.
Rob
--- busybox-old/archival/tar.c 2003-07-14 16:20:40.000000000 -0500
+++ busybox/archival/tar.c 2003-10-01 20:05:04.053520280 -0500
@@ -713,6 +713,10 @@
tar_handle->filter = filter_accept_reject_list;
}
+ if ((base_dir) && (chdir(base_dir))) {
+ bb_perror_msg_and_die("Couldnt chdir");
+ }
+
#ifdef CONFIG_FEATURE_TAR_CREATE
/* create an archive */
if (ctx_flag == CTX_CREATE) {
@@ -746,10 +750,6 @@
tar_handle->src_fd = bb_xopen(tar_filename, O_RDONLY);
}
- if ((base_dir) && (chdir(base_dir))) {
- bb_perror_msg_and_die("Couldnt chdir");
- }
-
while (get_header_ptr(tar_handle) == EXIT_SUCCESS);
/* Ckeck that every file that should have been extracted was */
More information about the busybox
mailing list