summaryrefslogtreecommitdiff
path: root/archival/unzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/unzip.c')
-rw-r--r--archival/unzip.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/archival/unzip.c b/archival/unzip.c
index bb7197d..b9dff19 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -236,9 +236,8 @@ int unzip_main(int argc, char **argv)
}
/* Change dir if necessary */
- if (base_dir && chdir(base_dir)) {
- bb_perror_msg_and_die("Cannot chdir");
- }
+ if (base_dir)
+ bb_xchdir(base_dir);
if (verbosity != v_silent)
printf("Archive: %s\n", src_fn);