Skip to content

Commit d4ad17b

Browse files
committed
update
1 parent 69d5872 commit d4ad17b

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

Editor/ProjectCreatorWindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ end)
169169
}
170170

171171
wi::unordered_set<std::string> exes;
172-
exes.insert(wi::helper::GetExecutablePath());
173-
exes.insert(wi::helper::GetCurrentPath() + "/Editor_Windows.exe");
174-
exes.insert(wi::helper::GetCurrentPath() + "/Editor_Linux");
172+
exes.insert(wi::helper::BackslashToForwardSlash(wi::helper::GetExecutablePath()));
173+
exes.insert(wi::helper::BackslashToForwardSlash(wi::helper::GetCurrentPath() + "/Editor_Windows.exe"));
174+
exes.insert(wi::helper::BackslashToForwardSlash(wi::helper::GetCurrentPath() + "/Editor_Linux"));
175175

176176
for (auto& exepath_src : exes)
177177
{

WickedEngine/wiHelper.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,13 @@ namespace wi::helper
10731073
}
10741074
}
10751075

1076+
std::string BackslashToForwardSlash(const std::string& str)
1077+
{
1078+
std::string ret = str;
1079+
std::replace(ret.begin(), ret.end(), '\\', '/');
1080+
return ret;
1081+
}
1082+
10761083
void DirectoryCreate(const std::string& path)
10771084
{
10781085
std::filesystem::create_directories(ToNativeString(path));

WickedEngine/wiHelper.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ namespace wi::helper
8989

9090
void MakePathAbsolute(std::string& path);
9191

92+
std::string BackslashToForwardSlash(const std::string& str);
93+
9294
void DirectoryCreate(const std::string& path);
9395

9496
// Returns the file size if the file exists, otherwise 0

0 commit comments

Comments
 (0)