From 46f8fd99fdc037452f7af1ca5af83b388e96b10d Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Mon, 30 Jun 2014 10:13:11 -0400 Subject: [PATCH] HashDB panel reverts only if ingest is not running. Prevents bug that closes DB while still in use. --- .../modules/hashdatabase/HashLookupSettingsPanel.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java index 61155edb82..3bc20c4da4 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java @@ -269,9 +269,15 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan } public void cancel() { - HashDbManager.getInstance().loadLastSavedConfiguration(); + /* Revert back to last settings only if the user could have + * made changes. Doing this while ingest is running causes + * hash dbs to be closed while they are still being used. + */ + if (IngestManager.getInstance().isIngestRunning() == false) { + HashDbManager.getInstance().loadLastSavedConfiguration(); + } } - + void removeThese(List toRemove) { for (HashDb hashDb : toRemove) { hashSetManager.removeHashDatabaseInternal(hashDb);