[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.68,1.69 resource.cpp,1.88,1.89

James Brown ender at users.sourceforge.net
Mon Jun 17 18:24:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv3075

Modified Files:
	gameDetector.cpp resource.cpp 
Log Message:
Check for trailing slash on pathnames


Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- gameDetector.cpp	16 May 2002 06:46:50 -0000	1.68
+++ gameDetector.cpp	18 Jun 2002 01:23:24 -0000	1.69
@@ -530,6 +530,11 @@
 	if (!_gameDataPath) {
 		warning("No path was provided. Assuming the data files are in the current directory");
 		_gameDataPath = Scumm::Strdup("");
+	} else if (_gameDataPath[strlen(_gameDataPath)-1] != '/' && _gameDataPath[strlen(_gameDataPath)-1] != '\\') {
+		char slashless[1024];	/* Append slash to path */
+		strcpy(slashless, _gameDataPath);
+		_gameDataPath = (char *)malloc((strlen(slashless) + 1) * sizeof(char));
+		sprintf(_gameDataPath, "%s/", slashless);
 	}
 
 	if (_amiga)

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- resource.cpp	23 May 2002 00:45:59 -0000	1.88
+++ resource.cpp	18 Jun 2002 01:23:24 -0000	1.89
@@ -201,7 +201,7 @@
 
 void Scumm::askForDisk(const char *filename)
 {
-	error("Cannot find '%s'", filename);
+	error("ask Cannot find '%s'", filename);
 }
 
 void Scumm::readIndexFile()





More information about the Scummvm-git-logs mailing list