-
Notifications
You must be signed in to change notification settings - Fork 34
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
Behaviour for joining multiple S3Path
s?
#75
Comments
Also, we special case joining strings: julia> @which join(abc, "foo/bar")
join(prefix::S3Path, pieces::AbstractString...) in AWSS3 at /Users/nick/.julia/packages/AWSS3/UmYRI/src/s3path.jl:94 But for julia> @which join(abc, p"foo/bar")
join(prefix::T, pieces::Union{AbstractString, AbstractPath}...) where T<:AbstractPath in FilePathsBase at /Users/nick/.julia/packages/FilePathsBase/Oyg1p/src/path.jl:230 This gives correct for julia> abc / WindowsPath("foo/bar")
p"s3://a/b/c/foo/bar"
julia> abc / PosixPath("foo/bar")
p"s3://a/b/c/foo/bar" But if we decide this behaviour in the opening post is not what we want for joining multiple |
i think joining multiple S3Paths is probably just nonsense. If there's a public API to get the segments (is there?), then you can just explicitly do julia> abc = S3Path("s3://a/b/c/");
julia> xyz = S3Path("s3://x/y/z");
julia> join(abc, xyz.segments...)
p"s3://a/b/c/y/z" So i think |
actually, afaict FilePathsBase does not test joining Paths to Paths at all https://github.com/rofinn/FilePathsBase.jl/blob/820903b2c8521f6a871ba7651763bcbce6754087/src/test.jl#L330 |
I've no idea what behaviour is expected or intended for joining together
S3Path
sThere is no test case for it. But here's what happens right now. We should maybe consider if this is what is wanted, then either add a test or fix it.
The text was updated successfully, but these errors were encountered: