Make path separator OS-dependent (PR #954)

This commit is contained in:
Andrea
2021-05-19 21:10:22 +01:00
committed by GitHub
parent 1b9a769332
commit de7f35e6bd
10 changed files with 30 additions and 24 deletions
+2 -2
View File
@@ -288,8 +288,8 @@ bool SetCurrentImageDir(const std::string& pszImageDir)
{
g_sCurrentDir = pszImageDir;
if (!g_sCurrentDir.empty() && *g_sCurrentDir.rbegin() != '\\')
g_sCurrentDir += '\\';
if (!g_sCurrentDir.empty() && *g_sCurrentDir.rbegin() != PATH_SEPARATOR)
g_sCurrentDir += PATH_SEPARATOR;
if (SetCurrentDirectory(g_sCurrentDir.c_str()))
return true;