summaryrefslogtreecommitdiff
path: root/src/strife/m_saves.c
diff options
context:
space:
mode:
authorSimon Howard2012-02-14 20:32:21 +0000
committerSimon Howard2012-02-14 20:32:21 +0000
commit28445ff77a0cc82d29900a6e5867a0fa577f4275 (patch)
tree0e2463c558778dc3dd00adfeb171daec4b549e5c /src/strife/m_saves.c
parent1a203c8eee521de027f0bb1eee1e93d8f6e17dec (diff)
downloadchocolate-doom-28445ff77a0cc82d29900a6e5867a0fa577f4275.tar.gz
chocolate-doom-28445ff77a0cc82d29900a6e5867a0fa577f4275.tar.bz2
chocolate-doom-28445ff77a0cc82d29900a6e5867a0fa577f4275.zip
Fix save game directory behavior under Windows.
Subversion-branch: /branches/v2-branch Subversion-revision: 2504
Diffstat (limited to 'src/strife/m_saves.c')
-rw-r--r--src/strife/m_saves.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/strife/m_saves.c b/src/strife/m_saves.c
index 74717dbd..a4068c4f 100644
--- a/src/strife/m_saves.c
+++ b/src/strife/m_saves.c
@@ -430,6 +430,11 @@ char *M_SafeFilePath(const char *basepath, const char *newcomponent)
int newstrlen = 0;
char *newstr = NULL;
+ if (!strcmp(basepath, ""))
+ {
+ basepath = ".";
+ }
+
// Always throw in a slash. M_NormalizeSlashes will remove it in the case
// that either basepath or newcomponent includes a redundant slash at the
// end or beginning respectively.