mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Fix zip structure checks checking for wrong filename
It was checking for .vvv-mnt-temp-XXXXXX/LEVELNAME.vvvvvv instead of LEVELNAME.vvvvvv. When PhysFS enumerates the folder, it only gives us LEVELNAME.vvvvvv, and not .vvv-mnt-temp-XXXXXX/LEVELNAME.vvvvvv.
This commit is contained in:
parent
3ca7b09012
commit
db76735c07
1 changed files with 11 additions and 3 deletions
|
@ -359,6 +359,7 @@ static bool checkZipStructure(const char* filename)
|
|||
{
|
||||
const char* real_dir = PHYSFS_getRealDir(filename);
|
||||
char base_name[MAX_PATH];
|
||||
char base_name_suffixed[MAX_PATH];
|
||||
char real_path[MAX_PATH];
|
||||
char mount_path[MAX_PATH];
|
||||
char check_path[MAX_PATH];
|
||||
|
@ -392,18 +393,25 @@ static bool checkZipStructure(const char* filename)
|
|||
|
||||
VVV_between(filename, "levels/", base_name, ".zip");
|
||||
|
||||
SDL_snprintf(
|
||||
base_name_suffixed,
|
||||
sizeof(base_name_suffixed),
|
||||
"%s.vvvvvv",
|
||||
base_name
|
||||
);
|
||||
|
||||
SDL_snprintf(
|
||||
check_path,
|
||||
sizeof(check_path),
|
||||
"%s%s.vvvvvv",
|
||||
"%s%s",
|
||||
mount_path,
|
||||
base_name
|
||||
base_name_suffixed
|
||||
);
|
||||
|
||||
success = PHYSFS_exists(check_path);
|
||||
|
||||
SDL_zero(zip_state);
|
||||
zip_state.filename = check_path;
|
||||
zip_state.filename = base_name_suffixed;
|
||||
|
||||
PHYSFS_enumerate(mount_path, zipCheckCallback, (void*) &zip_state);
|
||||
|
||||
|
|
Loading…
Reference in a new issue