From ab8f58efd70b29fb557dc584a9ad2e3ffda6106f Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 1 Apr 2021 10:43:40 -0400 Subject: [PATCH] 7471 re-order case opening and deleting of file --- .../sleuthkit/autopsy/casemodule/StartupWindowProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java index d3cc39f6ad..bb624254ff 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java @@ -95,15 +95,15 @@ public class StartupWindowProvider implements StartupWindowInterface { Charset encoding = null; caseFilePath = FileUtils.readFileToString(openPreviousCaseFile, encoding); if (new File(caseFilePath).exists()) { - Case.openAsCurrentCase(caseFilePath); FileUtils.forceDelete(openPreviousCaseFile); + Case.openAsCurrentCase(caseFilePath); //the case is now open we do not want to display the start up windows return; } else { logger.log(Level.WARNING, "Unable to open previously open case because metadata file not found at: {0}", caseFilePath); } } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to open file containing path " + ResetWindowsAction.getCaseToReopenFilePath() + " to previously open case, will not open previous case.", ex); + logger.log(Level.WARNING, "Unable to open or delete file containing path " + ResetWindowsAction.getCaseToReopenFilePath() + " to previously open case, will not open previous case.", ex); } catch (CaseActionException ex) { logger.log(Level.WARNING, "Unable to open previously open case with metadata file: " + caseFilePath, ex); }