summaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-04-12 18:39:58 +0000
committerBernhard Reutner-Fischer2006-04-12 18:39:58 +0000
commitd9cf7ac781c1274d6d23fa5674b6b90baaf4cf61 (patch)
treec7e395cfe1eafcd601bc16e0231fc30f8789e4d9 /archival/tar.c
parent67f641e75b685abe1588b634b409c1ee2ff68c22 (diff)
downloadbusybox-d9cf7ac781c1274d6d23fa5674b6b90baaf4cf61.zip
busybox-d9cf7ac781c1274d6d23fa5674b6b90baaf4cf61.tar.gz
- patch from Denis Vlasenko to add and use bb_xchdir()
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 9d0a7c5..dcc2f16 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -19,9 +19,8 @@
*
* Based in part on the tar implementation from busybox-0.28
* Copyright (C) 1995 Bruce Perens
- * This is free software under the GNU General Public License.
*
- * Licensed under GPL v2 (or later), see file LICENSE in this tarball.
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#include <fcntl.h>
@@ -834,8 +833,8 @@ int tar_main(int argc, char **argv)
}
}
- if ((base_dir) && (chdir(base_dir)))
- bb_perror_msg_and_die("Couldnt chdir to %s", base_dir);
+ if (base_dir)
+ bb_xchdir(base_dir);
/* create an archive */
if (ENABLE_FEATURE_TAR_CREATE && (opt & CTX_CREATE)) {