- allow UNC search paths on Windows

This commit is contained in:
Rachael Alexanderson 2021-05-26 10:47:36 -04:00
parent 4ff4fa643b
commit fd97da05b7

View file

@ -248,8 +248,18 @@ TArray<FString> CollectSearchPaths()
for (auto &str : searchpaths)
{
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.
if (str.Back() == '/') str.Truncate(str.Len() - 1);
#ifdef _WIN32
if (isUNCpath)
str = (FString)"/" + str;
#endif
}
return searchpaths;
}