[PATCH] D67166: Win: handle \\?UNC\ prefix in realPathFromHandle (PR43204)
    Jeroen Dobbelaere via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep  4 08:56:01 PDT 2019
    
    
  
jeroen.dobbelaere added a comment.
Hi Hans, I am not too familiar with all windows path naming variants. Did you really observe a '\\?UNC\xxxx' path ?
================
Comment at: llvm/lib/Support/Windows/Path.inc:379
+  if (CountChars >= 7 && ::memcmp(Data, L"\\\\?UNC\\", 14) == 0) {
+    // Convert \\?UNC\foo\bar to \\foo\bar
+    CountChars -= 5;
----------------
For my testcase, I observe a:
    \\?\UNC\server\path
       ^-- extra \
So, the check should be:
    if (CountChars >= 8 && ::memcmp(Data, L"\\\\?\\UNC\\", 16) == 0) {
Later on, CountChars and Data should be reduced by '6'.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67166/new/
https://reviews.llvm.org/D67166
    
    
More information about the llvm-commits
mailing list