[PATCH] D71490: [lit] [windows] Make sure to convert all path separators to backslashes in NT style \\?\... paths
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 00:09:53 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd39510ec1cda: [lit] [windows] Make sure to convert all path separators to backslashes in NT… (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D71490?vs=233868&id=234227#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71490/new/
https://reviews.llvm.org/D71490
Files:
llvm/utils/lit/lit/util.py
Index: llvm/utils/lit/lit/util.py
===================================================================
--- llvm/utils/lit/lit/util.py
+++ llvm/utils/lit/lit/util.py
@@ -151,6 +151,10 @@
from ctypes import GetLastError, WinError
path = os.path.abspath(path)
+ # Make sure that the path uses backslashes here, in case
+ # python would have happened to use forward slashes, as the
+ # NT path format only supports backslashes.
+ path = path.replace('/', '\\')
NTPath = to_unicode(r'\\?\%s' % path)
if not windll.kernel32.CreateDirectoryW(NTPath, None):
raise WinError(GetLastError())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71490.234227.patch
Type: text/x-patch
Size: 695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191217/43850f1c/attachment.bin>
More information about the llvm-commits
mailing list