[PATCH] D50082: Fix an invalid check in Windows implementation of directory_iterator factory function
    Lenar Safin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jul 31 10:34:14 PDT 2018
    
    
  
sl created this revision.
sl added a reviewer: Bigcheese.
Do actually check the last symbol of given file path.
Repository:
  rL LLVM
https://reviews.llvm.org/D50082
Files:
  lib/Support/Windows/Path.inc
Index: lib/Support/Windows/Path.inc
===================================================================
--- lib/Support/Windows/Path.inc
+++ lib/Support/Windows/Path.inc
@@ -910,8 +910,8 @@
 
   // Convert path to the format that Windows is happy with.
   if (path_utf16.size() > 0 &&
-      !is_separator(path_utf16[path.size() - 1]) &&
-      path_utf16[path.size() - 1] != L':') {
+      !is_separator(path_utf16[path_utf16.size() - 1]) &&
+      path_utf16[path_utf16.size() - 1] != L':') {
     path_utf16.push_back(L'\\');
     path_utf16.push_back(L'*');
   } else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50082.158299.patch
Type: text/x-patch
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180731/bd3a7b72/attachment.bin>
    
    
More information about the llvm-commits
mailing list