Print error when write directory fails;

This commit is contained in:
bjorn 2017-03-11 01:58:11 -08:00
parent 331f273e9b
commit 65338c8312
1 changed files with 4 additions and 1 deletions

View File

@ -206,7 +206,10 @@ int lovrFilesystemSetIdentity(const char* identity) {
snprintf(state.savePathRelative, LOVR_PATH_MAX, "LOVR%s%s", sep, identity);
snprintf(state.savePathFull, LOVR_PATH_MAX, "%s%s%s", state.savePathFull, sep, state.savePathRelative);
PHYSFS_mkdir(state.savePathRelative);
PHYSFS_setWriteDir(state.savePathRelative);
if (!PHYSFS_setWriteDir(state.savePathFull)) {
error("Could not set write directory");
}
PHYSFS_mount(state.savePathFull, NULL, 0);
return 0;