[PATCH] PR21482: long paths on Windows

Robinson, Paul Paul_Robinson at playstation.sony.com
Mon Nov 10 14:12:13 PST 2014


Hmmm  I thought about always making it absolute but that seemed like an excessive amount of string manipulation in the normal case.
But, ha! we can just query GetCurrentDirectory to get the current path length, to figure out if it *would* exceed the limit.  And if it would, *then* we can convert it to an absolute path with the prefix.
How does that sound?
--paulr

From: David Majnemer [mailto:david.majnemer at gmail.com]
Sent: Monday, November 10, 2014 1:42 PM
To: Robinson, Paul
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] PR21482: long paths on Windows

This patch doesn't kick in if we have a really big relative path.  Would it make sense for us to make the path absolute (using GetCurrentDirectory) and then prefix it with \\?\ ?

On Mon, Nov 10, 2014 at 1:01 PM, Robinson, Paul <Paul_Robinson at playstation.sony.com<mailto:Paul_Robinson at playstation.sony.com>> wrote:
Support directory names longer than 248 characters on Windows.

The normal Windows path limit is 260 characters; the limit for directory
names is 248, to leave room for an 8.3 filename at the end.  Adding the
'\\?\' prefix greatly expands these limits.  Intercept path names that
we are about to pass to the Windows APIs and add the prefix if necessary.

Also correct the comment about the state of the temporary directory used
by the Support unittests.
--paulr


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141110/5413552e/attachment.html>


More information about the llvm-commits mailing list