Creating .wlgb directory if it isn't there.

This commit is contained in:
Winston Li 2014-11-19 21:07:55 +00:00
parent 832009e6cf
commit 0442cd7e0b

View file

@ -91,6 +91,7 @@ public class SQLiteWLDatabase {
public SQLiteWLDatabase(File rootGitDirectory) throws SQLException, ClassNotFoundException {
this.rootGitDirectory = rootGitDirectory;
File databaseFile = new File(rootGitDirectory, "/.wlgb/wlgb.db");
databaseFile.getParentFile().mkdirs();
System.out.println("Loading data...");
Class.forName("org.sqlite.JDBC");
connection = DriverManager.getConnection("jdbc:sqlite:" + databaseFile.getAbsolutePath());