[PATCH] PR21482: long paths on Windows

Robinson, Paul Paul_Robinson at playstation.sony.com
Mon Nov 10 15:03:19 PST 2014


> -----Original Message-----
> From: Rafael EspĂ­ndola [mailto:rafael.espindola at gmail.com]
> Sent: Monday, November 10, 2014 2:44 PM
> To: Robinson, Paul
> Cc: llvm-commits at cs.uiuc.edu; Aaron Ballman
> Subject: Re: [PATCH] PR21482: long paths on Windows
> 
> static std::error_code widen_path(const Twine &Path8,
> 
> widenPath

I'd wondered about that; can do.

> 
> Using  '\\?\'  also disables using / as a path separator, no? Don't we
> have to check/assert that there is no / in Path8?
> 
> +  size_t NLevels = ((248 - TmpLen) / 10) + 1;
> +  const char *OneDir = "\\123456789";
> 
> Use the size of OneDir instead of hard codding the 10.

Hmm also assert that the size is < 12, that's the relevant criterion.
I want to guarantee that the conjured-up pathname has a length in the
range 248 < len < 260.

> 
> Aaron, this only uses '\\?\' to create long paths. They can still be
> accessed by regular tools by changing the current directory, no?
> 
> On 10 November 2014 16:01, Robinson, Paul
> <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
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >




More information about the llvm-commits mailing list