Skip to content

Commit

Permalink
fix: N5FSReader should fail if base path does not exist (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhulbert committed Dec 22, 2022
1 parent c69d850 commit a81cfc4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/janelia/saalfeldlab/n5/N5FSReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import com.google.gson.JsonObject;
import java.io.Closeable;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
import java.nio.channels.OverlappingFileLockException;
Expand Down Expand Up @@ -120,6 +122,8 @@ public N5FSReader(final String basePath, final GsonBuilder gsonBuilder) throws I
final Version version = getVersion();
if (!VERSION.isCompatible(version))
throw new IOException("Incompatible version " + version + " (this is " + VERSION + ").");
} else {
throw new IOException("Base Path for N5Reader does not exist: " + basePath);
}
}

Expand Down

0 comments on commit a81cfc4

Please sign in to comment.