From e854c376058fde8fd848e3765b674294fa9a7d11 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Mon, 19 Feb 2018 06:27:47 -0500 Subject: [PATCH] fix for issue #1108 --- core/src/main/java/org/owasp/dependencycheck/Engine.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/owasp/dependencycheck/Engine.java b/core/src/main/java/org/owasp/dependencycheck/Engine.java index 015833e55b6..1fd4bb21455 100644 --- a/core/src/main/java/org/owasp/dependencycheck/Engine.java +++ b/core/src/main/java/org/owasp/dependencycheck/Engine.java @@ -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) {