Don't call DoesFileExist in ChangeToDirOfExecutable.
This commit is contained in:
@@ -88,7 +88,7 @@ static void ChangeToDirOfExecutable(const char *argv0)
|
|||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
DirOfExecutable = "D:\\" ;
|
DirOfExecutable = "D:\\" ;
|
||||||
return ;
|
return ;
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
DirOfExecutable = argv0;
|
DirOfExecutable = argv0;
|
||||||
// strip off executable name
|
// strip off executable name
|
||||||
@@ -110,16 +110,9 @@ static void ChangeToDirOfExecutable(const char *argv0)
|
|||||||
if( !IsAbsolutePath )
|
if( !IsAbsolutePath )
|
||||||
DirOfExecutable = GetCwd() + "/" + DirOfExecutable;
|
DirOfExecutable = GetCwd() + "/" + DirOfExecutable;
|
||||||
|
|
||||||
#ifndef _XBOX
|
/* Make sure the current directory is the root program directory. */
|
||||||
/* Make sure the current directory is the root program directory
|
chdir( DirOfExecutable );
|
||||||
* We probably shouldn't do this; rather, we should know where things
|
FlushDirCache();
|
||||||
* are and use paths as needed, so we don't depend on the binary being
|
|
||||||
* in the same place as "Songs" ... */
|
|
||||||
if( !DoesFileExist("Songs") )
|
|
||||||
{
|
|
||||||
chdir( DirOfExecutable );
|
|
||||||
FlushDirCache();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user