[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.78,1.79
kirben
kirben at users.sourceforge.net
Sat Apr 23 02:22:45 CEST 2005
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26761/common
Modified Files:
file.cpp
Log Message:
Check for a '\' before adding slash too, otherwise starting a game in root directory will fail.
Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- file.cpp 22 Apr 2005 17:40:07 -0000 1.78
+++ file.cpp 23 Apr 2005 09:21:41 -0000 1.79
@@ -34,18 +34,11 @@
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
More information about the Scummvm-git-logs
mailing list