diff options
Diffstat (limited to 'src/main/cpp/util')
-rw-r--r-- | src/main/cpp/util/file_windows.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/cpp/util/file_windows.cc b/src/main/cpp/util/file_windows.cc index 9d22444dc8..e2e12950eb 100644 --- a/src/main/cpp/util/file_windows.cc +++ b/src/main/cpp/util/file_windows.cc @@ -35,6 +35,7 @@ using std::pair; using std::string; using std::unique_ptr; using std::wstring; +using windows_util::HasUncPrefix; // Returns the current working directory as a Windows path. // The result may have a UNC prefix. @@ -101,12 +102,6 @@ static bool HasDriveSpecifierPrefix(const char_type* ch) { return CharTraits<char_type>::IsAlpha(ch[0]) && ch[1] == ':'; } -template <typename char_type> -static bool HasUncPrefix(const char_type* path) { - return path[0] == '\\' && (path[1] == '\\' || path[1] == '?') && - (path[2] == '.' || path[2] == '?') && path[3] == '\\'; -} - static void AddUncPrefixMaybe(wstring* path) { if (path->size() >= MAX_PATH && !HasUncPrefix(path->c_str())) { *path = wstring(L"\\\\?\\") + *path; |