mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Quick fix - create dynos/mods directories if they don't exist
This commit is contained in:
parent
435f64fe24
commit
0aab42a27e
1 changed files with 7 additions and 0 deletions
|
@ -92,11 +92,18 @@ static bool mod_import_zip(char* path, bool* isLua, bool* isDynos) {
|
|||
if (*isLua) {
|
||||
snprintf(dstDirectory, SYS_MAX_PATH, "%s", (char*)fs_get_write_path(MOD_DIRECTORY));
|
||||
} else if (*isDynos) {
|
||||
char* dynosPath = (char*)fs_get_write_path(DYNOS_RES_FOLDER);
|
||||
if (!fs_sys_dir_exists(dynosPath)) {
|
||||
fs_sys_mkdir(dynosPath);
|
||||
}
|
||||
snprintf(dstDirectory, SYS_MAX_PATH, "%s", (char*)fs_get_write_path(DYNOS_PACKS_FOLDER));
|
||||
} else {
|
||||
LOG_ERROR("Could not figure out what type of mod this is");
|
||||
return false;
|
||||
}
|
||||
if (!fs_sys_dir_exists(dstDirectory)) {
|
||||
fs_sys_mkdir(dstDirectory);
|
||||
}
|
||||
|
||||
// Extract the archive
|
||||
for (int i = 0; i < (int)mz_zip_reader_get_num_files(&zip_archive); i++) {
|
||||
|
|
Loading…
Reference in a new issue