Resolved crash when there is no hal.db file present during upstart
Former-commit-id: c684641b9fcca9addf38328a4fca7d3ea4bf3e48
This commit is contained in:
parent
588507621a
commit
bc3c7edbc1
1 changed files with 3 additions and 1 deletions
|
|
@ -58,7 +58,9 @@ public class HalContext {
|
|||
File dbFile = FileUtil.find(DB_FILE);
|
||||
if(dbFile == null){
|
||||
logger.info("Creating new DB...");
|
||||
FileUtil.copy(dbFile, FileUtil.find(DEFAULT_DB_FILE));
|
||||
dbFile = new File(DB_FILE);
|
||||
dbFile.createNewFile();
|
||||
FileUtil.copy(FileUtil.find(DEFAULT_DB_FILE), dbFile);
|
||||
}
|
||||
db = new DBConnection(DBConnection.DBMS.SQLite, DB_FILE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue