Skip to content

Commit

Permalink
XmlIoN5ImageLoader: handle absolute path without URI scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Sep 14, 2024
1 parent d6022ac commit ddb7b91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/bdv/img/n5/XmlIoN5ImageLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ public N5ImageLoader fromXml( final Element elem, final URI basePathURI, final A
final boolean hasScheme = scheme != null;
if ( !hasScheme || FILE_SCHEME.asPredicate().test( scheme ) )
{
final N5FSReader n5 = new N5FSReader( new File( uri ).getAbsolutePath() );
final String path = hasScheme
? new File( uri ).getAbsolutePath()
: uri.getPath();
final N5FSReader n5 = new N5FSReader( path );
return new N5ImageLoader( n5, uri, sequenceDescription );
}
}
Expand Down

0 comments on commit ddb7b91

Please sign in to comment.