mirror of
https://github.com/sheumann/hush.git
synced 2025-01-22 03:30:37 +00:00
- use bb_xchdir instead of ignoring eventual errors of chdir
Thanks to Erik Hovland
This commit is contained in:
parent
2d1a6e7c1f
commit
44e216f264
@ -89,8 +89,8 @@ int dpkg_deb_main(int argc, char **argv)
|
||||
extract_dir = argv[optind];
|
||||
}
|
||||
if (extract_dir) {
|
||||
mkdir(extract_dir, 0777);
|
||||
chdir(extract_dir); /* error check? */
|
||||
mkdir(extract_dir, 0777); /* bb_make_directory(extract_dir, 0777, 0) */
|
||||
bb_xchdir(extract_dir);
|
||||
}
|
||||
unpack_ar_archive(ar_archive);
|
||||
|
||||
|
@ -198,7 +198,7 @@ void extract_cpio_gz(int fd) {
|
||||
bb_error_msg_and_die("Invalid gzip magic");
|
||||
}
|
||||
check_header_gzip(archive_handle->src_fd);
|
||||
chdir("/"); // Install RPM's to root
|
||||
bb_xchdir("/"); // Install RPM's to root
|
||||
|
||||
archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip);
|
||||
archive_handle->offset = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user