Просмотр исходного кода

Creating .wlgb directory if it isn't there.

Winston Li 12 лет назад
Родитель
Сommit
0442cd7e0b

+ 1 - 0
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());