From 789007ec67d486eb111c7b3fcf82a2e951781138 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 23 Apr 2005 09:21:41 +0000 Subject: Check for a '\' before adding slash too, otherwise starting a game in root directory will fail. svn-id: r17763 --- common/file.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'common/file.cpp') 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 -- cgit v1.2.3