aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/native/windows/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/native/windows/file.h')
-rw-r--r--src/main/native/windows/file.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/native/windows/file.h b/src/main/native/windows/file.h
index b1a57101ff..a8cbe71c5a 100644
--- a/src/main/native/windows/file.h
+++ b/src/main/native/windows/file.h
@@ -28,8 +28,11 @@ using std::wstring;
template <typename char_type>
bool HasUncPrefix(const char_type* path) {
- return path[0] == '\\' && (path[1] == '\\' || path[1] == '?') &&
- (path[2] == '.' || path[2] == '?') && path[3] == '\\';
+ // Return true iff `path` starts with "\\?\", "\\.\", or "\??\".
+ return path[0] == '\\' &&
+ ((path[1] == '\\' && (path[2] == '?' || path[2] == '.')) ||
+ (path[1] == '?' && path[2] == '?')) &&
+ path[3] == '\\';
}
// Keep in sync with j.c.g.devtools.build.lib.windows.WindowsFileOperations