From 0442cd7e0ba7c8e008c33b1bb29ef6a99f94fa8b Mon Sep 17 00:00:00 2001 From: Winston Li Date: Wed, 19 Nov 2014 21:07:55 +0000 Subject: [PATCH] Creating .wlgb directory if it isn't there. --- .../ac/ic/wlgitbridge/writelatex/model/db/SQLiteWLDatabase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/model/db/SQLiteWLDatabase.java b/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/model/db/SQLiteWLDatabase.java index ed83471f7c..6704153deb 100644 --- a/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/model/db/SQLiteWLDatabase.java +++ b/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/model/db/SQLiteWLDatabase.java @@ -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());