From 2f6e5c16820dad4b70351568b1e95b0f5000db43 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 25 Jan 2022 15:12:39 -0500 Subject: [PATCH 01/10] readdir must return strings for FilePathsBase compatibility --- src/s3path.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s3path.jl b/src/s3path.jl index b0bee27c..69727f6d 100644 --- a/src/s3path.jl +++ b/src/s3path.jl @@ -582,7 +582,7 @@ function Base.readdir(fp::S3Path; join=false, sort=true) sort && sort!(results) # Return results, possibly joined with the root path if join=true - return join ? joinpath.(fp, results) : results + return join ? string.(joinpath.(fp, results)) : results else throw(ArgumentError("\"$fp\" is not a directory")) end From ebd54da3a580a9e2b2f3dabd29d28f70b0185d0a Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 25 Jan 2022 15:17:27 -0500 Subject: [PATCH 02/10] fix tests --- test/s3path.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/s3path.jl b/test/s3path.jl index c3f7fa4c..e4cb7b13 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -245,19 +245,19 @@ end function verify_files(path::S3Path) @test readdir(path) == ["emptydir/", "subdir1/", "test_01.txt"] @test readdir(path; join=true) == - [path / "emptydir/", path / "subdir1/", path / "test_01.txt"] + string.([path / "emptydir/", path / "subdir1/", path / "test_01.txt"]) @test readdir(path / "emptydir/") == [] @test readdir(path / "emptydir/"; join=true) == [] @test readdir(path / "subdir1/") == ["subdir2/", "test_02.txt", "test_03.txt"] - @test readdir(path / "subdir1/"; join=true) == [ + @test readdir(path / "subdir1/"; join=true) == string.([ path / "subdir1/" / "subdir2/", path / "subdir1/" / "test_02.txt", path / "subdir1/" / "test_03.txt", - ] + ]) @test readdir(path / "subdir1/subdir2/") == ["subdir3/", "test_04.txt"] - @test readdir(path / "subdir1/subdir2/"; join=true) == [ + @test readdir(path / "subdir1/subdir2/"; join=true) == string.([ path / "subdir1/subdir2/" / "subdir3/", path / "subdir1/subdir2/" / "test_04.txt" - ] + ]) @test readdir(path / "subdir1/subdir2/subdir3/") == [] @test readdir(path / "subdir1/subdir2/subdir3/"; join=true) == [] end @@ -269,11 +269,11 @@ function verify_files(path::AbstractPath) @test readdir(path / "emptydir/") == [] VERSION >= v"1.4.0" && @test readdir(path / "emptydir/"; join=true) == [] @test readdir(path / "subdir1/") == ["subdir2", "test_02.txt", "test_03.txt"] - VERSION >= v"1.4.0" && @test readdir(path / "subdir1/"; join=true) == [ + VERSION >= v"1.4.0" && @test readdir(path / "subdir1/"; join=true) == string.([ path / "subdir1" / "subdir2", path / "subdir1" / "test_02.txt", path / "subdir1/" / "subdir1/test_03.txt", - ] + ]) @test readdir(path / "subdir1/subdir2/") == ["subdir3", "test_04.txt"] VERSION >= v"1.4.0" && @test readdir(path / "subdir1/subdir2/"; join=true) == [ path / "subdir1/subdir2/" / "subdir3", path / "subdir1/subdir2/" / "test_04.txt" From 27d989261978e2547aac1738809b5b6d1fcc7f0c Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 25 Jan 2022 15:21:42 -0500 Subject: [PATCH 03/10] formatting --- test/s3path.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/s3path.jl b/test/s3path.jl index e4cb7b13..6d64f720 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -249,13 +249,15 @@ function verify_files(path::S3Path) @test readdir(path / "emptydir/") == [] @test readdir(path / "emptydir/"; join=true) == [] @test readdir(path / "subdir1/") == ["subdir2/", "test_02.txt", "test_03.txt"] - @test readdir(path / "subdir1/"; join=true) == string.([ + @test readdir(path / "subdir1/"; join=true) == + string.([ path / "subdir1/" / "subdir2/", path / "subdir1/" / "test_02.txt", path / "subdir1/" / "test_03.txt", ]) @test readdir(path / "subdir1/subdir2/") == ["subdir3/", "test_04.txt"] - @test readdir(path / "subdir1/subdir2/"; join=true) == string.([ + @test readdir(path / "subdir1/subdir2/"; join=true) == + string.([ path / "subdir1/subdir2/" / "subdir3/", path / "subdir1/subdir2/" / "test_04.txt" ]) @test readdir(path / "subdir1/subdir2/subdir3/") == [] @@ -269,7 +271,8 @@ function verify_files(path::AbstractPath) @test readdir(path / "emptydir/") == [] VERSION >= v"1.4.0" && @test readdir(path / "emptydir/"; join=true) == [] @test readdir(path / "subdir1/") == ["subdir2", "test_02.txt", "test_03.txt"] - VERSION >= v"1.4.0" && @test readdir(path / "subdir1/"; join=true) == string.([ + VERSION >= v"1.4.0" && @test readdir(path / "subdir1/"; join=true) == + string.([ path / "subdir1" / "subdir2", path / "subdir1" / "test_02.txt", path / "subdir1/" / "subdir1/test_03.txt", From 18b72359cafb47e0421e49d21504128f22246988 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 8 Feb 2022 14:39:53 -0500 Subject: [PATCH 04/10] Update test/s3path.jl Co-authored-by: Curtis Vogt --- test/s3path.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/s3path.jl b/test/s3path.jl index 6d64f720..f4d49183 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -249,8 +249,7 @@ function verify_files(path::S3Path) @test readdir(path / "emptydir/") == [] @test readdir(path / "emptydir/"; join=true) == [] @test readdir(path / "subdir1/") == ["subdir2/", "test_02.txt", "test_03.txt"] - @test readdir(path / "subdir1/"; join=true) == - string.([ + @test readdir(path / "subdir1/"; join=true) == String[ path / "subdir1/" / "subdir2/", path / "subdir1/" / "test_02.txt", path / "subdir1/" / "test_03.txt", From ad79ff295ff88441b4ff9d1bad29d7defd1401b5 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 8 Feb 2022 14:39:59 -0500 Subject: [PATCH 05/10] Update test/s3path.jl Co-authored-by: Curtis Vogt --- test/s3path.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/s3path.jl b/test/s3path.jl index f4d49183..da5414fb 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -245,7 +245,7 @@ end function verify_files(path::S3Path) @test readdir(path) == ["emptydir/", "subdir1/", "test_01.txt"] @test readdir(path; join=true) == - string.([path / "emptydir/", path / "subdir1/", path / "test_01.txt"]) + String[path / "emptydir/", path / "subdir1/", path / "test_01.txt"] @test readdir(path / "emptydir/") == [] @test readdir(path / "emptydir/"; join=true) == [] @test readdir(path / "subdir1/") == ["subdir2/", "test_02.txt", "test_03.txt"] From 130a6b0cc48da601f32d029de89cbd6b9f5b0708 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 8 Feb 2022 14:40:04 -0500 Subject: [PATCH 06/10] Update test/s3path.jl Co-authored-by: Curtis Vogt --- test/s3path.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/s3path.jl b/test/s3path.jl index da5414fb..1dbc9660 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -253,7 +253,7 @@ function verify_files(path::S3Path) path / "subdir1/" / "subdir2/", path / "subdir1/" / "test_02.txt", path / "subdir1/" / "test_03.txt", - ]) + ] @test readdir(path / "subdir1/subdir2/") == ["subdir3/", "test_04.txt"] @test readdir(path / "subdir1/subdir2/"; join=true) == string.([ From 2d0efbb3456f3fb6cb9fb4c262160c96dbefac9a Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 8 Feb 2022 14:40:10 -0500 Subject: [PATCH 07/10] Update test/s3path.jl Co-authored-by: Curtis Vogt --- test/s3path.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/s3path.jl b/test/s3path.jl index 1dbc9660..a2667d73 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -255,8 +255,7 @@ function verify_files(path::S3Path) path / "subdir1/" / "test_03.txt", ] @test readdir(path / "subdir1/subdir2/") == ["subdir3/", "test_04.txt"] - @test readdir(path / "subdir1/subdir2/"; join=true) == - string.([ + @test readdir(path / "subdir1/subdir2/"; join=true) == String[ path / "subdir1/subdir2/" / "subdir3/", path / "subdir1/subdir2/" / "test_04.txt" ]) @test readdir(path / "subdir1/subdir2/subdir3/") == [] From 9ecbbe22c4f2ab8e8f416b8a3097bb770f40ce51 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 8 Feb 2022 14:40:15 -0500 Subject: [PATCH 08/10] Update test/s3path.jl Co-authored-by: Curtis Vogt --- test/s3path.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/s3path.jl b/test/s3path.jl index a2667d73..447d5437 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -257,7 +257,7 @@ function verify_files(path::S3Path) @test readdir(path / "subdir1/subdir2/") == ["subdir3/", "test_04.txt"] @test readdir(path / "subdir1/subdir2/"; join=true) == String[ path / "subdir1/subdir2/" / "subdir3/", path / "subdir1/subdir2/" / "test_04.txt" - ]) + ] @test readdir(path / "subdir1/subdir2/subdir3/") == [] @test readdir(path / "subdir1/subdir2/subdir3/"; join=true) == [] end From fbc38672b46b86290ffa8b79f7dfcce9196dbf52 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 8 Feb 2022 14:40:20 -0500 Subject: [PATCH 09/10] Update test/s3path.jl Co-authored-by: Curtis Vogt --- test/s3path.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/s3path.jl b/test/s3path.jl index 447d5437..2a7aaeec 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -269,8 +269,7 @@ function verify_files(path::AbstractPath) @test readdir(path / "emptydir/") == [] VERSION >= v"1.4.0" && @test readdir(path / "emptydir/"; join=true) == [] @test readdir(path / "subdir1/") == ["subdir2", "test_02.txt", "test_03.txt"] - VERSION >= v"1.4.0" && @test readdir(path / "subdir1/"; join=true) == - string.([ + VERSION >= v"1.4.0" && @test readdir(path / "subdir1/"; join=true) == String[ path / "subdir1" / "subdir2", path / "subdir1" / "test_02.txt", path / "subdir1/" / "subdir1/test_03.txt", From fa92dd13894fe28756e493073a5b93c84cc249d6 Mon Sep 17 00:00:00 2001 From: ExpandingMan Date: Tue, 8 Feb 2022 14:40:25 -0500 Subject: [PATCH 10/10] Update test/s3path.jl Co-authored-by: Curtis Vogt --- test/s3path.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/s3path.jl b/test/s3path.jl index 2a7aaeec..511501a3 100644 --- a/test/s3path.jl +++ b/test/s3path.jl @@ -273,7 +273,7 @@ function verify_files(path::AbstractPath) path / "subdir1" / "subdir2", path / "subdir1" / "test_02.txt", path / "subdir1/" / "subdir1/test_03.txt", - ]) + ] @test readdir(path / "subdir1/subdir2/") == ["subdir3", "test_04.txt"] VERSION >= v"1.4.0" && @test readdir(path / "subdir1/subdir2/"; join=true) == [ path / "subdir1/subdir2/" / "subdir3", path / "subdir1/subdir2/" / "test_04.txt"