From fd97da05b7a11192cf33f6d72e4a53a25555f5b2 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 26 May 2021 10:47:36 -0400 Subject: [PATCH] - allow UNC search paths on Windows --- source/core/searchpaths.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/core/searchpaths.cpp b/source/core/searchpaths.cpp index e6896dfc3..0d9dd01be 100644 --- a/source/core/searchpaths.cpp +++ b/source/core/searchpaths.cpp @@ -248,8 +248,18 @@ TArray 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; }