[PATCH] PR21482: long paths on Windows

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Nov 11 12:29:15 PST 2014


>> If the current directory path is large, an operation using a short
>> relative path will still work, no?
>
> No. I tried a 243-character relative path and made it not convert to an
> absolute path, when current directory had 36 characters. This failed
> with ERROR_PATH_NOT_FOUND (becomes errc::no_such_file_or_directory).
> However the same path, if converted to \\?\ absolute, succeeds.
>
> It's entirely possible that I've screwed up the test somehow, but I
> tried this a couple times with different combinations and got the
> same outcomes.
>
> So, what matters is the length of the absolute path of the entity
> being created, not the length of the string being passed to the API.

Gosh, this is far more restrictive than what I thought.

I can reproduce the error by just running "mkdir test && cd test" a few times!

I think I am OK with the patch then. Can you just extend the testcase
to show that create_directory also works with a relative path inside a
long dir? Please also wait to see if Aaron or Michael  have something
to say.

Cheers,
Rafael



More information about the llvm-commits mailing list