Skip to content

Commit

Permalink
- allow UNC search paths on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed May 26, 2021
1 parent 4ff4fa6 commit fd97da0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/core/searchpaths.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit fd97da0

Please sign in to comment.