From 0304a8b2a98286b1c3a87500711ac717d72e51b0 Mon Sep 17 00:00:00 2001 From: Michael Innerberger Date: Tue, 15 Oct 2024 15:06:35 -0400 Subject: [PATCH] Fix cloud access By adding cloud schemes to SpatialDataContainer.exists, cloud datasets pass this test --- src/main/java/io/SpatialDataContainer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/SpatialDataContainer.java b/src/main/java/io/SpatialDataContainer.java index 7b1ae87..98f0cd0 100644 --- a/src/main/java/io/SpatialDataContainer.java +++ b/src/main/java/io/SpatialDataContainer.java @@ -369,7 +369,12 @@ public String constructMatchName(final String stDataAName, final String stDataBN public static boolean exists(String path) { final URI uri = URI.create(path); - return Cloud.isFile(uri) && new File(path).exists(); + if (Cloud.isFile(uri)) + return new File(path).exists(); + else { + // TODO: this only verifies that the scheme is supported, not that the path actually exists + return Cloud.isGC(uri) || Cloud.isS3(uri); + } }