Try to change all back slashes to forward slashes.

This commit is contained in:
LunaMoo committed 2019-05-06 23:43:36 +02:00
1 parent 9b0b23934a
commit 63dcac833e
3 files changed
+10 -7

No files matched your search

+5 -2
View File
@@ -1268,9 +1268,12 @@ void Config::AddRecent(const std::string &file) {
// We'll add it back below. This makes sure it's at the front, and only once.
RemoveRecent(file);
const std::string filename = File::ResolvePath(file);
recentIsos.insert(recentIsos.begin(), filename);
std::string filename2 = filename;
#ifdef _WIN32
filename2 = ReplaceAll(filename, "\\", "/");
#endif
recentIsos.insert(recentIsos.begin(), filename2);
if ((int)recentIsos.size() > iMaxRecent)
recentIsos.resize(iMaxRecent);
}
+1 -1
View File
@@ -321,7 +321,7 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
#ifdef _WIN32
// Turn the slashes back to the Windows way.
path = ReplaceAll(path, "/", "\\");
//path = ReplaceAll(path, "/", "\\");
#endif
if (!PSP_CoreParameter().mountRoot.empty()) {
+4 -4
View File
@@ -76,9 +76,9 @@ static bool IsTempPath(const std::string &str) {
const auto testPath = [&](std::string temp) {
#ifdef _WIN32
temp = ReplaceAll(temp, "/", "\\");
if (!temp.empty() && temp[temp.size() - 1] != '\\')
temp += "\\";
temp = ReplaceAll(temp, "\\", "/");
if (!temp.empty() && temp[temp.size() - 1] != '/')
temp += "/";
#else
if (!temp.empty() && temp[temp.size() - 1] != '/')
temp += "/";
@@ -94,7 +94,7 @@ static bool IsTempPath(const std::string &str) {
#ifdef _WIN32
// Normalize slashes.
item = ReplaceAll(str, "/", "\\");
item = ReplaceAll(str, "\\", "/");
wchar_t tempPath[MAX_PATH];
GetTempPath(MAX_PATH, tempPath);