Skip to content

Commit 49f69e7

Browse files
committed
Another small fix for PDB_DIR
1 parent 17e641c commit 49f69e7

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

biojava3-structure/src/main/java/org/biojava/bio/structure/io/SandboxStyleStructureProvider.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import org.biojava.bio.structure.Structure;
1010
import org.biojava.bio.structure.StructureException;
11-
import org.biojava.bio.structure.align.ce.AbstractUserArgumentProcessor;
11+
import org.biojava.bio.structure.align.util.UserConfiguration;
1212
import org.biojava3.core.util.InputStreamProvider;
1313

1414

@@ -98,14 +98,9 @@ public class SandboxStyleStructureProvider implements StructureProvider {
9898
public SandboxStyleStructureProvider() {
9999
params = new FileParsingParameters();
100100

101+
UserConfiguration config = new UserConfiguration();
101102

102-
String defaultPath = System.getProperty(AbstractUserArgumentProcessor.PDB_DIR);
103-
if ( defaultPath == null) {
104-
String property = "java.io.tmpdir";
105-
defaultPath = System.getProperty(property);
106-
}
107-
108-
setPath(defaultPath);
103+
setPath(config.getPdbFilePath());
109104
}
110105

111106
/** directory where to find PDB files */
@@ -147,7 +142,7 @@ public Structure getStructureById(String pdbId) throws IOException,StructureExce
147142
return struc ;
148143

149144

150-
} catch (Exception e){
145+
} catch (IOException e){
151146
e.printStackTrace();
152147
// something is wrong with the file!
153148
// it probably should be downloaded again...

0 commit comments

Comments
 (0)