1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-16 16:09:42 +01:00

Contextualize PHYSFS_mountHandle() failure output

If PHYSFS_mountHandle() failed to mount a zip file, we would print
PhysFS's error message straight, without any surrounding context. This
seems a little weird, and doesn't maximize understanding for readers;
I've made it so now the error message is "Could not mount <zip file>:
<PhysFS error>".
This commit is contained in:
Misa 2021-02-18 18:36:41 -08:00 committed by Ethan Lee
parent f22691c32a
commit 532dbee4fd

View file

@ -87,7 +87,11 @@ void editorclass::loadZips()
if (endsWith(directoryList[i], ".zip")) {
PHYSFS_File* zip = PHYSFS_openRead(directoryList[i].c_str());
if (!PHYSFS_mountHandle(zip, directoryList[i].c_str(), "levels", 1)) {
printf("%s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
printf(
"Could not mount %s: %s\n",
filename_.c_str(),
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
);
} else {
needsReload = true;
}