Skip to content

Conversation

@daveinglis
Copy link
Contributor

The //?/ prefix needs to be added to directories if the length is greater than MAX_PATH - 12, however the PATHCCH_ALLOW_LONG_PATHS to PathAllocCanonicalize would only do that if the path was greater than MAX_PATH. This change uses PATHCCH_ENSURE_IS_EXTENDED_LENGTH_PATH, which forces it on all the time. Just needed to remove the prefix in a few places as it was making it way out into tests as this is suppose to be transparent to the user.

This also fixes createDirectory() "withIntermediateDirectories: true" for long paths on Windows.

The //?/ prefix needs to be added to directories if the length is
greater than MAX_PATH - 12, however the PATHCCH_ALLOW_LONG_PATHS to
PathAllocCanonicalize would only do that if the path was greater than
MAX_PATH. This change uses PATHCCH_ENSURE_IS_EXTENDED_LENGTH_PATH, which
forces it on all the time.  Just needed to remove the prefix in a few
places as it was making it way out into tests as this is suppose to be
transparent to the user.

This also fixes createDirectory() "withIntermediateDirectories: true"
for long paths on Windows.

(cherry picked from commit 6b787ac)
@daveinglis
Copy link
Contributor Author

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant