mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
misc cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3942 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -487,18 +487,20 @@ bool DeleteDirRecursively(const char *directory)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns the current directory, caller should free
|
||||
const char *GetCurrentDir()
|
||||
// Returns the current directory
|
||||
std::string GetCurrentDir()
|
||||
{
|
||||
const char *dir;
|
||||
char *dir;
|
||||
// Get the current working directory (getcwd uses malloc)
|
||||
if (!(dir = __getcwd(NULL, 0))) {
|
||||
|
||||
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s",
|
||||
GetLastErrorMsg());
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
return dir;
|
||||
std::string strDir = dir;
|
||||
free(dir);
|
||||
return strDir;
|
||||
}
|
||||
|
||||
// Sets the current directory to the given directory
|
||||
@ -577,14 +579,15 @@ std::string GetSysDirectory()
|
||||
sysDir = GetBundleDirectory();
|
||||
sysDir += DIR_SEP;
|
||||
sysDir += SYSDATA_DIR;
|
||||
sysDir += DIR_SEP;
|
||||
#elif defined __linux__
|
||||
sysDir = SYSDATA_DIR;
|
||||
sysDir += DIR_SEP;
|
||||
// FIXME global install
|
||||
#else
|
||||
sysDir = SYSDATA_DIR;
|
||||
sysDir = FULL_SYSDATA_DIR;
|
||||
#endif
|
||||
|
||||
sysDir += DIR_SEP;
|
||||
INFO_LOG(COMMON, "GetSysDirectory: Setting to %s:", sysDir.c_str());
|
||||
return sysDir;
|
||||
}
|
||||
|
Reference in New Issue
Block a user