Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to run in a read-only environment #558

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion prboom2/src/SDL/i_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ const char *I_ConfigDir(void)
#endif
}

M_MakeDir(base, true); // Make sure it exists
M_MakeDir(base, false);
}

return base;
Expand Down
4 changes: 2 additions & 2 deletions prboom2/src/dsda/data_organizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void dsda_InitDataDir(void) {
dsda_StringPrintF(&str, "%s/%s", parent_directory, dsda_data_root);

dsda_base_data_dir = str.string;
M_MakeDir(dsda_base_data_dir, true);
M_MakeDir(dsda_base_data_dir, false);

Z_Free(parent_directory);
}
Expand Down Expand Up @@ -126,7 +126,7 @@ static void dsda_InitWadDataDir(void) {
for (i = 0; i < DATA_DIR_LIMIT; ++i)
if (dsda_data_dir_strings[i]) {
dsda_StringCatF(&str, "/%s", dsda_data_dir_strings[i]);
M_MakeDir(str.string, true);
M_MakeDir(str.string, false);
}

dsda_wad_data_dir = str.string;
Expand Down
4 changes: 2 additions & 2 deletions prboom2/src/dsda/tranmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void dsda_InitTranMapBaseDir(void) {
tranmap_base_dir = Z_Malloc(length);
snprintf(tranmap_base_dir, length, "%s/tranmaps", data_root);

M_MakeDir(tranmap_base_dir, true);
M_MakeDir(tranmap_base_dir, false);
}

static void dsda_InitTranMapPaletteDir(void) {
Expand All @@ -73,7 +73,7 @@ static void dsda_InitTranMapPaletteDir(void) {
tranmap_palette_dir = Z_Malloc(length);
snprintf(tranmap_palette_dir, length, "%s/%s", tranmap_base_dir, playpal_cksum.string);

M_MakeDir(tranmap_palette_dir, true);
M_MakeDir(tranmap_palette_dir, false);
}

//
Expand Down
5 changes: 4 additions & 1 deletion prboom2/src/dsda/wad_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ void dsda_SaveWadStats(void) {

file = M_OpenFile(path, "wb");
if (!file)
lprintf(LO_WARN, "dsda_SaveWadStats: Failed to save wad stats file \"%s\".", path);
{
lprintf(LO_WARN, "dsda_SaveWadStats: Failed to save wad stats file \"%s\".\n", path);
return;
}

fprintf(file, "%d\n", current_version);
fprintf(file, "%d\n", wad_stats.total_kills);
Expand Down
Loading