diff --git a/file.c b/file.c index 770b338585..b7091c2c52 100644 --- a/file.c +++ b/file.c @@ -652,7 +652,6 @@ bool init_rom_file(enum rarch_game_type type) if (ext && !strcasecmp(ext, "zip")) { g_extern.rom_file_temporary = true; - strlcpy(g_extern.last_rom, g_extern.fullpath, sizeof(g_extern.last_rom)); if (!zlib_extract_first_rom(g_extern.fullpath, sizeof(g_extern.fullpath), g_extern.system.valid_extensions)) { @@ -660,6 +659,8 @@ bool init_rom_file(enum rarch_game_type type) g_extern.rom_file_temporary = false; return false; } + + strlcpy(g_extern.last_rom, g_extern.fullpath, sizeof(g_extern.last_rom)); } } #endif