fix identification of SQLite file

This commit is contained in:
Eyck Jentzsch 2020-03-21 11:31:59 +01:00
parent ec5cd209c6
commit 0cfcc8c118
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import java.beans.IntrospectionException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.ArrayList;
@ -91,6 +92,8 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
if (buffer[i] != x[i]) return false;
} catch(FileNotFoundException e) {
return false;
} catch(IOException e) { //if an I/O error occurs
return false;
}
database=new SQLiteDatabase(file.getAbsolutePath());
database.setData("TIMERESOLUTION", 1L);