fix up DirOfExecutable
This commit is contained in:
@@ -94,13 +94,15 @@ static void ChangeToDirOfExecutable(const char *argv0)
|
|||||||
InitialWorkingDirectory = tmp;
|
InitialWorkingDirectory = tmp;
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
DirOfExecutable = "D:\\" ;
|
DirOfExecutable = "D:/";
|
||||||
return ;
|
return;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
DirOfExecutable = argv0;
|
DirOfExecutable = argv0;
|
||||||
|
DirOfExecutable.Replace( "\\", "/" );
|
||||||
|
|
||||||
// strip off executable name
|
// strip off executable name
|
||||||
unsigned n = DirOfExecutable.find_last_of("/\\");
|
unsigned n = DirOfExecutable.find_last_of("/");
|
||||||
if( n != DirOfExecutable.npos )
|
if( n != DirOfExecutable.npos )
|
||||||
DirOfExecutable.erase(n);
|
DirOfExecutable.erase(n);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user