Unify the windows ifdef block, even if it's not completely DRY
@@ -221,19 +221,17 @@ char *pm_get_local_base_dir() {
int sherr = SHCreateDirectoryEx(NULL, out, NULL);
if(sherr == ERROR_FILE_EXISTS) {
snprintf(errormessage, 128, "Please delete this file and relaunch OpenOMF: %s", out);
- goto exit;
+ free(out);
+ return NULL;
} else if(sherr != ERROR_SUCCESS && sherr != ERROR_ALREADY_EXISTS) {
snprintf(errormessage, 128, "Failed to create config path: %s", out);
- goto exit;
+ free(out);
+ return NULL;
}
#endif
// All done
return out;
-
-exit:
- free(out);
- return NULL;
}
const char *pm_get_local_path(unsigned int local_id) {
