diff options
author | Travis Howell | 2005-04-23 09:21:41 +0000 |
---|---|---|
committer | Travis Howell | 2005-04-23 09:21:41 +0000 |
commit | 789007ec67d486eb111c7b3fcf82a2e951781138 (patch) | |
tree | dc74aa92f2e567457dda7e031f3b869cd5b21245 /common | |
parent | 24f2ca3d3470908f037112eac92b4cf3730b1d81 (diff) | |
download | scummvm-rg350-789007ec67d486eb111c7b3fcf82a2e951781138.tar.gz scummvm-rg350-789007ec67d486eb111c7b3fcf82a2e951781138.tar.bz2 scummvm-rg350-789007ec67d486eb111c7b3fcf82a2e951781138.zip |
Check for a '\' before adding slash too, otherwise starting a game in root directory will fail.
svn-id: r17763
Diffstat (limited to 'common')
-rw-r--r-- | common/file.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/common/file.cpp b/common/file.cpp index 85cd75fd51..1be6f6a7a5 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -34,18 +34,11 @@ static FILE *fopenNoCase(const char *filename, const char *directory, const char assert(directory); strcpy(buf, directory); -#ifdef WIN32 - // Fix for Win98 issue related with game directory pointing to root drive ex. "c:\" - if ((buf[0] != 0) && (buf[1] == ':') && (buf[2] == '\\') && (buf[3] == 0)) { - buf[2] = 0; - } -#endif - #if !defined(__GP32__) && !defined(__PALM_OS__) // Add a trailing slash, if necessary. if (buf[0] != 0) { const int dirLen = strlen(buf); - if (buf[dirLen-1] != ':' && buf[dirLen-1] != '/') + if (buf[dirLen-1] != ':' && buf[dirLen-1] != '/' && buf[dirLen-1] != '\\') strcat(buf, "/"); } #endif |