Skip to content

Commit

Permalink
on windows remove colon from absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
ancho committed Feb 12, 2019
1 parent 5f1d861 commit fdfdefc
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jbake.app;

import org.apache.commons.vfs2.util.Os;
import org.jbake.TestUtils;
import org.jbake.app.configuration.ConfigUtil;
import org.jbake.app.configuration.DefaultJBakeConfiguration;
Expand Down Expand Up @@ -36,6 +37,12 @@ public static void setUpClass() throws Exception {
Assert.assertEquals(".html", config.getOutputExtension());
config.setDatabaseStore(storageType.toString());
String dbPath = folder.newFolder("documents" + System.currentTimeMillis()).getAbsolutePath();

// setting the database path with a colon creates an invalid url for OrientDB.
// only one colon is expected. there is no documentation about proper url path for windows available :(
if (Os.isFamily(Os.OS_FAMILY_WINDOWS)) {
dbPath = dbPath.replace(":","");
}
config.setDatabasePath(dbPath);
db = DBUtil.createDataStore(config);
}
Expand Down

0 comments on commit fdfdefc

Please sign in to comment.