Closed aam closed 1 week ago
The culprit is https://dart-review.git.corp.google.com/c/sdk/+/372400 which started to convert destination to long-prefixed form.
https://dart-review.googlesource.com/c/sdk/+/374220 with proposed fix
and https://dart-review.googlesource.com/c/sdk/+/374181 with the prebuilt roll
Thanks for looking at this @aam.
Note that the fix landed in b207aed is incomplete I think. What this bug shows is that our IsAbsolutePath
predicate is incorrect to begin with. So the fix did not fix the full problem e.g. consider situations where force_long_prefix
is false
but we have long "pseudo-absolute" path which starts with C:\
but has ..
segments inside.
I wonder if we should just start using PathCchCanonicalizeEx
? Our minimum supported Windows version allows us to use it.
Good point! But my thinking was that it's only when we use force_long_prefix
the ..
segments cause issues in "absolute paths".
But my thinking was that it's only when we use
force_long_prefix
the..
segments cause issues in "absolute paths".
force_long_prefix
is just a short-cut in some sense. So whatever problem exists with it, will also exist with paths that are just long by themselves.
Shortcut in what sense? I thought presence of long prefix disables some file/directory name processing and validation - stuff like handling of ..
@aam in the implementation sense. I added force_long_prefix
to simplify implementation of Copy
which would otherwise need to worry with path length.
@aam Would you submit a follow up change to fix the whole issue?
@mraleph wrote
Would you submit a follow up change to fix the whole issue?
Is this what you had in mind https://dart-review.googlesource.com/c/sdk/+/375421 ?
For example https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-aot-win-debug-x64/167/overview
Failure:
cc @mraleph