diff --git a/src/main/java/net/preibisch/mvrecon/fiji/plugin/queryXML/GenericLoadParseQueryXML.java b/src/main/java/net/preibisch/mvrecon/fiji/plugin/queryXML/GenericLoadParseQueryXML.java index a5ef35f3..73902631 100644 --- a/src/main/java/net/preibisch/mvrecon/fiji/plugin/queryXML/GenericLoadParseQueryXML.java +++ b/src/main/java/net/preibisch/mvrecon/fiji/plugin/queryXML/GenericLoadParseQueryXML.java @@ -294,7 +294,18 @@ public boolean queryXML( // try parsing if it ends with XML // also initializes messages - tryParsing( defaultXMLURI.trim().length() == 0 ? URI.create( "" ) : URITools.toURI( defaultXMLURI ), false ); + // could be an 'easter egg', fixed by not assigned them as default below + URI uritmp; + try + { + uritmp = defaultXMLURI.trim().length() == 0 ? URI.create( "" ) : URITools.toURI( defaultXMLURI ); + } + catch ( Exception e ) + { + uritmp = URI.create( defaultXMLURI = "" ); + } + + tryParsing( uritmp, false ); if ( additionalTitle != null && additionalTitle.length() > 0 ) gd = new GenericDialogPlus( "Select dataset for " + additionalTitle ); @@ -349,7 +360,11 @@ public boolean queryXML( if ( gd.wasCanceled() ) return false; - String xmlURI = defaultXMLURI = gd.getNextString(); + String xmlURI = gd.getNextString(); + + // only remember XML's > easter eggs create issues down the line as they are a relative URI + if ( xmlURI.endsWith( ".xml" ) ) + defaultXMLURI = xmlURI; // try to parse the file anyways boolean success;