Skip to content

Commit

Permalink
fix for issue #1108
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Feb 19, 2018
1 parent 7229f3b commit e854c37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/owasp/dependencycheck/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,9 @@ public void openDatabase(boolean readOnly, boolean lockRequired) throws Database
LOGGER.debug("copying complete '{}'", temp.toPath());
settings.setString(Settings.KEYS.DATA_DIRECTORY, temp.getPath());
final String connStr = settings.getString(Settings.KEYS.DB_CONNECTION_STRING);
settings.setString(Settings.KEYS.DB_CONNECTION_STRING, connStr + "ACCESS_MODE_DATA=r");
if (!connStr.contains("ACCESS_MODE_DATA")) {
settings.setString(Settings.KEYS.DB_CONNECTION_STRING, connStr + "ACCESS_MODE_DATA=r");
}
database = new CveDB(settings);
}
} catch (IOException ex) {
Expand Down

0 comments on commit e854c37

Please sign in to comment.