Canonicalize filesystem paths in user-facing APIs (#2370) #2371
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.
Which issue does this PR close?
Closes #2370
Rationale for this change
Users expect to be able to pass arbitrary paths to
LocalFileSystem::new_with_prefix
orPath::from_filesystem_path
and for it to work correctly. This stopped working following #2269 as we stopped canonicalizing paths.This PR therefore strikes a middle-ground, we canonicalize paths passed to the external interfaces, ensuring the above works. However, we otherwise continue to preserve symlinks, etc... whilst navigating the filesystem as part of object storage operation, thereby ensuring symlinks behave "as expected".
What changes are included in this PR?
Are there any user-facing changes?