File tree Expand file tree Collapse file tree
render-app/src/main/java/org/janelia/alignment/loader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,10 +88,16 @@ public ImageProcessor load(final String urlString) {
8888 // If the URL opener did not work, try to open the file directly.
8989 if (imagePlus == null ) {
9090 File file = null ;
91- if (urlString .startsWith ("file:" )) {
92- file = new File (urlString .substring (5 ));
93- } else if (urlString .charAt (0 ) == '/' || urlString .charAt (0 ) == '\\' ) {
91+ if (urlString .charAt (0 ) == '/' || urlString .charAt (0 ) == '\\' ) {
9492 file = new File (urlString );
93+ } else if (urlString .startsWith ("file:" )) {
94+ int beginIndex = 5 ;
95+ if (urlString .charAt (beginIndex ) == '/' ) {
96+ while ((urlString .length () > (beginIndex + 1 )) && (urlString .charAt (beginIndex + 1 ) == '/' )) {
97+ beginIndex ++;
98+ }
99+ }
100+ file = new File (urlString .substring (beginIndex ));
95101 }
96102 if (file != null && file .exists ()) {
97103 // Try to open file directly since URL opener failed.
You can’t perform that action at this time.
0 commit comments