mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Merge pull request #6216 from APriestman/openWithAutFile
Allow a case to be opened from command line using the .aut file
This commit is contained in:
commit
11dc6ee9cc
@ -36,15 +36,20 @@ class CommandLineManager {
|
|||||||
/**
|
/**
|
||||||
* Opens existing case.
|
* Opens existing case.
|
||||||
*
|
*
|
||||||
* @param caseFolderPath full path to case directory
|
* @param casePath full path to case directory or full path to .aut file
|
||||||
*
|
*
|
||||||
* @throws CaseActionException
|
* @throws CaseActionException
|
||||||
*/
|
*/
|
||||||
Case openCase(String caseFolderPath) throws CaseActionException {
|
Case openCase(String casePath) throws CaseActionException {
|
||||||
|
|
||||||
LOGGER.log(Level.INFO, "Opening case in directory {0}", caseFolderPath);
|
String metadataFilePath;
|
||||||
|
if (casePath.endsWith(".aut") && (new File(casePath)).isFile()) {
|
||||||
String metadataFilePath = findAutFile(caseFolderPath);
|
LOGGER.log(Level.INFO, "Opening case {0}", casePath);
|
||||||
|
metadataFilePath = casePath;
|
||||||
|
} else {
|
||||||
|
LOGGER.log(Level.INFO, "Opening case in directory {0}", casePath);
|
||||||
|
metadataFilePath = findAutFile(casePath);
|
||||||
|
}
|
||||||
Case.openAsCurrentCase(metadataFilePath);
|
Case.openAsCurrentCase(metadataFilePath);
|
||||||
|
|
||||||
Case newCase = Case.getCurrentCase();
|
Case newCase = Case.getCurrentCase();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user