Skip to content

Commit

Permalink
Fix multiple ISOs extraction (fixes XboxDev#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
rapperskull committed Sep 4, 2023
1 parent 36a9a1f commit 1bc46b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extract-xiso.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,14 +1179,14 @@ int decode_xiso( char *in_xiso, char *in_path, modes in_mode, char **out_iso_pat
}

if (!err && in_mode == k_extract) {
if ((cwd = getcwd(NULL, 0)) == NULL) mem_err();
if (in_path) {
if (strlen(in_path) == 0) misc_err("empty destination path");
if (!err && (cwd = getcwd(NULL, 0)) == NULL) mem_err();
if (!err && strlen(in_path) == 0) misc_err("empty destination path");
if (!err && mkdir(in_path, 0755) == -1) mkdir_err(in_path);
if (!err && chdir(in_path) == -1) chdir_err(in_path);
}
else {
if (strlen(iso_name) == 0) misc_err("invalid xiso image name: %s", in_xiso);
if (!err && strlen(iso_name) == 0) misc_err("invalid xiso image name: %s", in_xiso);
if (!err && mkdir(iso_name, 0755) == -1) mkdir_err(iso_name);
if (!err && chdir(iso_name) == -1) chdir_err(iso_name);
}
Expand Down

0 comments on commit 1bc46b4

Please sign in to comment.