From a5124b118bd2277594faa8b6852de4b6703dc4fb Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 30 May 2022 00:12:06 +1000 Subject: [PATCH] FileSystem: Fix splitting UNC paths --- common/FileSystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index 1248823a09..132e841430 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -445,6 +445,11 @@ std::vector Path::SplitWindowsPath(const std::string_view& pat std::string::size_type start = 0; std::string::size_type pos = 0; + + // preserve unc paths + if (path.size() > 2 && path[0] == '\\' && path[1] == '\\') + pos = 2; + while (pos < path.size()) { if (path[pos] != '/' && path[pos] != '\\')