mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- allow UNC search paths on Windows
This commit is contained in:
parent
4ff4fa643b
commit
fd97da05b7
1 changed files with 10 additions and 0 deletions
|
@ -248,8 +248,18 @@ TArray<FString> CollectSearchPaths()
|
||||||
for (auto &str : searchpaths)
|
for (auto &str : searchpaths)
|
||||||
{
|
{
|
||||||
str.Substitute("\\", "/");
|
str.Substitute("\\", "/");
|
||||||
|
#ifdef _WIN32
|
||||||
|
bool isUNCpath = false;
|
||||||
|
auto chars = str.GetChars();
|
||||||
|
if (chars[0] == '/' && chars[1] == '/')
|
||||||
|
isUNCpath = true;
|
||||||
|
#endif
|
||||||
str.Substitute("//", "/"); // Double slashes can happen when constructing paths so just get rid of them here.
|
str.Substitute("//", "/"); // Double slashes can happen when constructing paths so just get rid of them here.
|
||||||
if (str.Back() == '/') str.Truncate(str.Len() - 1);
|
if (str.Back() == '/') str.Truncate(str.Len() - 1);
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (isUNCpath)
|
||||||
|
str = (FString)"/" + str;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return searchpaths;
|
return searchpaths;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue