Skip to content

Commit

Permalink
create savegame directory only when saving the game
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Dec 8, 2024
1 parent 6b75ff0 commit e6416e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1789,8 +1789,6 @@ void D_SetSavegameDirectory(void)
basesavegame = M_StringJoin(oldsavegame, DIR_SEPARATOR_S,
M_BaseName(wadname));
free(oldsavegame);

M_MakeDirectory(basesavegame);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,8 @@ static void DoSaveGame(char *name)
char *description;
int length, i;

M_MakeDirectory(basesavegame);

description = savedescription;

save_p = savebuffer = Z_Malloc(savegamesize, PU_STATIC, 0);
Expand Down

0 comments on commit e6416e2

Please sign in to comment.