fix file detection
This commit is contained in:
parent
2aa4160400
commit
270a004037
@ -81,6 +81,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
|
||||
|
||||
@Override
|
||||
public boolean load(IWaveformDb db, File file) throws Exception {
|
||||
if(file.isDirectory() || !file.exists()) return false;
|
||||
this.db=db;
|
||||
try {
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
|
@ -64,6 +64,7 @@ public class TextDbLoader implements IWaveformDbLoader{
|
||||
|
||||
@Override
|
||||
boolean load(IWaveformDb db, File file) throws Exception {
|
||||
if(file.isDirectory() || !file.exists()) return false;
|
||||
this.db=db
|
||||
this.streams=[]
|
||||
try {
|
||||
|
@ -79,6 +79,7 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean load(IWaveformDb db, File file) throws Exception {
|
||||
if(file.isDirectory() || !file.exists()) return false;
|
||||
this.db=db;
|
||||
this.maxTime=0;
|
||||
String name = file.getCanonicalFile().getName();
|
||||
|
@ -669,7 +669,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||
}
|
||||
if (filesToLoad.size() > 0)
|
||||
loadDatabase(persistedState);
|
||||
if(partConfig instanceof String) {
|
||||
if(partConfig instanceof String && ((String)partConfig).length()>0) {
|
||||
loadState((String) partConfig);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user