Foundation: support file system representation for long paths #4746
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adjusts the file system representation accessor for a URL to support paths beyond
MAX_PATH
. We do not know what the use of the file system representation is, so we cannot provide the NT style path (\\?\
-prefixed). Rather than using the filled in buffer, resolve the URL and then build the complete path copying that into a newly allocated buffer. This ensures that we always have sufficient space for the path without having to grow the buffer.Linux gets away with the current implementation by setting the
PATH_MAX
to page size (4096). There may be some value in using the single implementation across the different platforms, but this will allow the Windows path to make progress even if it diverges from the reference implementation.The issue was identified by the DocC test suite which quickly exceeds the length.