mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
7471 re-order case opening and deleting of file
This commit is contained in:
parent
8caf0fe4cd
commit
ab8f58efd7
@ -95,15 +95,15 @@ public class StartupWindowProvider implements StartupWindowInterface {
|
|||||||
Charset encoding = null;
|
Charset encoding = null;
|
||||||
caseFilePath = FileUtils.readFileToString(openPreviousCaseFile, encoding);
|
caseFilePath = FileUtils.readFileToString(openPreviousCaseFile, encoding);
|
||||||
if (new File(caseFilePath).exists()) {
|
if (new File(caseFilePath).exists()) {
|
||||||
Case.openAsCurrentCase(caseFilePath);
|
|
||||||
FileUtils.forceDelete(openPreviousCaseFile);
|
FileUtils.forceDelete(openPreviousCaseFile);
|
||||||
|
Case.openAsCurrentCase(caseFilePath);
|
||||||
//the case is now open we do not want to display the start up windows
|
//the case is now open we do not want to display the start up windows
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
logger.log(Level.WARNING, "Unable to open previously open case because metadata file not found at: {0}", caseFilePath);
|
logger.log(Level.WARNING, "Unable to open previously open case because metadata file not found at: {0}", caseFilePath);
|
||||||
}
|
}
|
||||||
} catch (IOException ex) {
|
} 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) {
|
} catch (CaseActionException ex) {
|
||||||
logger.log(Level.WARNING, "Unable to open previously open case with metadata file: " + caseFilePath, ex);
|
logger.log(Level.WARNING, "Unable to open previously open case with metadata file: " + caseFilePath, ex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user