mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Fix Windows path separator issue
This commit is contained in:
parent
87be68cd6c
commit
47acc08996
2 changed files with 1 additions and 6 deletions
|
@ -52,7 +52,7 @@ public:
|
||||||
for (auto& p : fs::recursive_directory_iterator(dir))
|
for (auto& p : fs::recursive_directory_iterator(dir))
|
||||||
{
|
{
|
||||||
if (!p.is_directory())
|
if (!p.is_directory())
|
||||||
lst.push_back(p.path().string());
|
lst.push_back(p.path().generic_string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,12 +242,7 @@ namespace Ship {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<ResourcePromise> ResourceMgr::LoadResourceAsync(std::string FilePath) {
|
std::shared_ptr<ResourcePromise> ResourceMgr::LoadResourceAsync(std::string FilePath) {
|
||||||
// todo: what?
|
|
||||||
#ifdef _WIN32
|
|
||||||
StringHelper::ReplaceOriginal(FilePath, "/", "\\");
|
|
||||||
#else
|
|
||||||
StringHelper::ReplaceOriginal(FilePath, "\\", "/");
|
StringHelper::ReplaceOriginal(FilePath, "\\", "/");
|
||||||
#endif
|
|
||||||
|
|
||||||
if (StringHelper::StartsWith(FilePath, "__OTR__"))
|
if (StringHelper::StartsWith(FilePath, "__OTR__"))
|
||||||
FilePath = StringHelper::Split(FilePath, "__OTR__")[1];
|
FilePath = StringHelper::Split(FilePath, "__OTR__")[1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue