-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3Path: relativize can return an absolute path #293
Comments
So does
result in a path equivalent to "./foo/bar/"? |
No, it results in a path equivalent to "foo/bar/". This I interpret as the relative path from "/foo/bar/" to "/". |
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
Mar 3, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
Mar 3, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
Mar 3, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
Mar 3, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
Mar 3, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
Mar 3, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
Mar 3, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path
Merged
markjschreiber
pushed a commit
that referenced
this issue
Mar 4, 2024
…io/file/Path.html#subpath-int-int- subpath shall return a relative path (#394)
Can you check if PR #394 has fixed this? |
This test seems to pass with PR #394.
|
I have added some additional tests to prevent a regression. Feel free to open a new issue if this is still a problem. |
stefanofornari
added a commit
to stefanofornari/aws-java-nio-spi-for-s3
that referenced
this issue
May 20, 2024
…/java/nio/file/Path.html#subpath-int-int- subpath shall return a relative path (awslabs#394)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are relying in a part of our implementation on the behavior of the Path.relativize() to return a relative path. I discovered that the S3Path gives an absolute path back, if the relativize is executed on the root path. I checked again against windows and jimfs implementation:
Here again a matching unit test: https://github.com/thsandu/aws-java-nio-spi-for-s3-issues-with-s3x/blob/2cbb6d27b8adde8499f49a146eedce870dec1ec6/src/test/java/software/amazon/nio/spi/s3/S3PathTest.java#L293
The text was updated successfully, but these errors were encountered: