diff --git a/stepmania/src/RageFileManager.cpp b/stepmania/src/RageFileManager.cpp index d0f98cf42f..53581b1d19 100644 --- a/stepmania/src/RageFileManager.cpp +++ b/stepmania/src/RageFileManager.cpp @@ -1,4 +1,5 @@ #include "global.h" +#include "StepMania.h" #include "RageFileManager.h" #include "RageFileDriver.h" #include "RageUtil.h" @@ -85,15 +86,18 @@ RageFileManager::RageFileManager() /* Absolute paths. This is rarely used, eg. by Alsa9Buf::GetSoundCardDebugInfo(). */ RageFileManager::Mount( "dir", "/", "/" ); -#elif defined(WINDOWS) - /* All Windows data goes in the directory with the executable. */ +#elif defined(_WINDOWS) /* XXX: Test to see if we can write to the program directory tree. If we can't, * add a search path under "Documents and Settings" for writing scores, etc. Otherwise, * don't. We don't want to write to D&S if we don't have to (it'll confuse people). */ /* RageFileManager::Mount( "dir", "******", "" ); */ - /* Paths relative to the CWD: */ - RageFileManager::Mount( "dir", ".", "" ); + /* All Windows data goes in the directory one level above the executable. */ + CStringArray parts; + split( DirOfExecutable, "/", parts ); + ASSERT( parts.size() > 1 ); + CString Dir = join( "/", parts.begin(), parts.end()-1 ); + RageFileManager::Mount( "dir", Dir, "" ); #else /* Paths relative to the CWD: */ RageFileManager::Mount( "dir", ".", "" );