Fixed issue where I only change a single instance lol

This commit is contained in:
sam-astro 2022-01-15 22:36:31 -05:00
parent 00bd652695
commit f52a2a194d

View File

@ -645,7 +645,7 @@ int main(int argc, char* argv[])
std::wstring wide = converter.from_bytes(projectDirectory); std::wstring wide = converter.from_bytes(projectDirectory);
#if defined(__unix__) #if defined(__unix__)
chdir(projectDirectory); chdir(projectDirectory.c_str());
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
LPCSTR s = projectDirectory.c_str(); LPCSTR s = projectDirectory.c_str();
SetCurrentDirectory(s); SetCurrentDirectory(s);
@ -672,10 +672,9 @@ int main(int argc, char* argv[])
std::wstring wide = converter.from_bytes(projectDirectory); std::wstring wide = converter.from_bytes(projectDirectory);
#if defined(__unix__) #if defined(__unix__)
const char[] pC = projectDirectory.c_str(); chdir(projectDirectory.c_str());
chdir(pC);
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
LPCWSTR s = wide.c_str(); LPCSTR s = projectDirectory.c_str();
SetCurrentDirectory(s); SetCurrentDirectory(s);
#endif #endif
// Get script contents // Get script contents