Skip to content

Commit

Permalink
#32 Is this what you meant?
Browse files Browse the repository at this point in the history
I'm not sure if this solve the bug you observed, in my case, i was not able to open directories. Could you elaborate how you caused this bug?
  • Loading branch information
JuliWanner committed Jul 7, 2018
1 parent 921bfb5 commit 6cfafa3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/java/de/sbtab/controller/SBTabController.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,17 @@ public Void call() {
try {
SBTabController.filePath = filePath;
File theSBMLFile = new File(filePath);
boolean isFile = theSBMLFile.isFile();
System.out.println(getFileExtension(theSBMLFile));
if(Objects.equals(getFileExtension(theSBMLFile), ".xml")){
doc = SBMLReader.read(theSBMLFile);
if(isFile){
if(Objects.equals(getFileExtension(theSBMLFile), ".xml")){
doc = SBMLReader.read(theSBMLFile);
}
if(Objects.equals(getFileExtension(theSBMLFile), ".gz")){
doc = SBMLReader.read(new GZIPInputStream(new FileInputStream(filePath)));
}
setProperties();
}
if(Objects.equals(getFileExtension(theSBMLFile), ".gz")){
doc = SBMLReader.read(new GZIPInputStream(new FileInputStream(filePath)));
}
setProperties();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 6cfafa3

Please sign in to comment.