[PATCH] D21420: Properly handle short file names on the command line in Windows
Adrian McCarthy via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 16 14:52:41 PDT 2016
amccarth marked 2 inline comments as done.
================
Comment at: lib/Support/Windows/Process.inc:236-237
@@ +235,4 @@
+ DWORD Length = GetLongPathNameW(Arg, LongPath.data(), LongPath.capacity());
+ if (Length == 0)
+ return mapWindowsError(GetLastError());
+ if (Length > LongPath.capacity()) {
----------------
GetLastError was useless. If Length > LongName.capacity(), then the path in LongName is truncated and GetLastError returns ERROR_SUCCESS. So I've broken this case out and returned a more specific error code.
http://reviews.llvm.org/D21420
More information about the llvm-commits
mailing list