use slashes as a directory separator instead of backslashes

This commit is contained in:
Glenn Maynard
2003-02-14 08:15:15 +00:00
parent 2a6730c9c1
commit ff38961907
11 changed files with 43 additions and 41 deletions
+7 -5
View File
@@ -34,18 +34,20 @@ bool RandomSample::LoadSoundDir( CString sDir )
if( sDir == "" )
return true;
sDir.Replace("\\", "/");
#if 0
/* (don't want to do this just yet) */
/* If this is actually a directory, add a backslash to the filename,
* so we'll look for eg. themes\Default\sounds\sDir\*.mp3. Otherwise,
* don't, so we'll look for all of the files starting with sDir,
* eg. themes\Default\sounds\sDir*.mp3. */
if(IsADirectory(sDir) && sDir[sDir.GetLength()-1] != '\\' )
sDir += "\\";
if(IsADirectory(sDir) && sDir[sDir.GetLength()-1] != '/' )
sDir += "/";
#else
// make sure there's a backslash at the end of this path
if( sDir[sDir.GetLength()-1] != '\\' )
sDir += "\\";
// make sure there's a slash at the end of this path
if( sDir[sDir.GetLength()-1] != '/' )
sDir += "/";
#endif
CStringArray arraySoundFiles;