Skip to content

Commit 0304a8b

Browse files
committed
Fix cloud access
By adding cloud schemes to SpatialDataContainer.exists, cloud datasets pass this test
1 parent 13275e6 commit 0304a8b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/java/io/SpatialDataContainer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,12 @@ public String constructMatchName(final String stDataAName, final String stDataBN
369369

370370
public static boolean exists(String path) {
371371
final URI uri = URI.create(path);
372-
return Cloud.isFile(uri) && new File(path).exists();
372+
if (Cloud.isFile(uri))
373+
return new File(path).exists();
374+
else {
375+
// TODO: this only verifies that the scheme is supported, not that the path actually exists
376+
return Cloud.isGC(uri) || Cloud.isS3(uri);
377+
}
373378
}
374379

375380

0 commit comments

Comments
 (0)