mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 02:07:42 +00:00
7471 tweak startup window behavior
This commit is contained in:
parent
b5c841a1d9
commit
9dd4abfc49
@ -144,9 +144,12 @@ public class StartupWindowProvider implements StartupWindowInterface {
|
||||
if (openPreviousCaseFile.exists()) {
|
||||
//do actual opening on another thread
|
||||
new Thread(() -> {
|
||||
//close the startup window as we attempt to open the case
|
||||
close();
|
||||
String caseFilePath = "";
|
||||
String unableToOpenMessage = null;
|
||||
try {
|
||||
//avoid readFileToString having ambiguous arguments
|
||||
Charset encoding = null;
|
||||
caseFilePath = FileUtils.readFileToString(openPreviousCaseFile, encoding);
|
||||
if (new File(caseFilePath).exists()) {
|
||||
@ -168,11 +171,10 @@ public class StartupWindowProvider implements StartupWindowInterface {
|
||||
final String message = unableToOpenMessage;
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
MessageNotifyUtil.Message.warn(message);
|
||||
//the case was not opened restore the startup window
|
||||
open();
|
||||
});
|
||||
} else {
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user