We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 771ba66 commit c3fc414Copy full SHA for c3fc414
1 file changed
src/main/java/org/janelia/saalfeldlab/n5/FsIoPolicy.java
@@ -42,7 +42,8 @@ static FileChannel openFileChannel(final Path path, final boolean forWriting) th
42
43
if (forWriting) {
44
final Path parent = path.getParent();
45
- if (parent != null) {
+ /* if not null and not directory, it will call `createDirectories` but we expect it to throw an IOException */
46
+ if (parent != null && !parent.toFile().isDirectory()) {
47
Files.createDirectories(parent);
48
}
49
return FileChannel.open(path, StandardOpenOption.READ, StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
0 commit comments