mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #5270 from markmckinnon/5535-add-option-to-open-portable-case-directly
5535 add option to open portable case directly
This commit is contained in:
commit
05497c6304
@ -117,7 +117,7 @@ CTL_CaseNewAction=New Case
|
||||
CTL_CaseDetailsAction=Case Details
|
||||
CTL_CaseDeleteAction=Delete Case
|
||||
CTL_CaseOpenAction=Open Case
|
||||
CTL_UnpackagePortableCaseAction=Unpackage Portable Case
|
||||
CTL_UnpackagePortableCaseAction=Unpack and Open Portable Case
|
||||
EditOptionalCasePropertiesPanel.cancelButton.text=Cancel
|
||||
EditOptionalCasePropertiesPanel.saveButton.text=Save
|
||||
GeneralFilter.encaseImageDesc.text=Encase Images (*.e01)
|
||||
|
@ -29,10 +29,10 @@ import org.openide.windows.WindowManager;
|
||||
|
||||
@ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseAction")
|
||||
@ActionRegistration(displayName = "#CTL_UnpackagePortableCaseAction", lazy = false)
|
||||
@Messages({"CTL_UnpackagePortableCaseAction=Unpackage Portable Case"})
|
||||
@Messages({"CTL_UnpackagePortableCaseAction=Unpack and Open Portable Case"})
|
||||
/**
|
||||
* Unpackage Portable Case action for the Case menu to allow the user to
|
||||
* decompress a portable case.
|
||||
* decompress a portable case and open it.
|
||||
*/
|
||||
public class UnpackagePortableCaseAction extends CallableSystemAction {
|
||||
|
||||
|
@ -30,6 +30,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.SwingWorker;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openide.modules.InstalledFileLocator;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.WindowManager;
|
||||
@ -189,7 +191,15 @@ class UnpackagePortableCaseProgressDialog extends javax.swing.JDialog implements
|
||||
setDisplayError(Bundle.UnpackageWorker_doInBackground_errorCompressingCase());
|
||||
throw new TskCoreException("Error unpackaging case", ex); // NON-NLS
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
String caseFileDirectory = FilenameUtils.getBaseName(packagedCase);
|
||||
String caseDirectory = StringUtils.substringBefore(caseFileDirectory, ".zip");
|
||||
Case.openAsCurrentCase(outputFolder + File.separator + caseDirectory + File.separator + caseDirectory + ".aut"); // NON-NLS
|
||||
} catch (CaseActionException ex) {
|
||||
throw new TskCoreException("Error opening case after unpacking it.", ex); // NON-NLS
|
||||
}
|
||||
|
||||
success.set(true);
|
||||
return null;
|
||||
}
|
||||
|
@ -150,16 +150,16 @@
|
||||
<attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-RecentCases.instance"/>
|
||||
</file>
|
||||
</folder>
|
||||
<file name="org-sleuthkit-autopsy-casemodule-UnpackagePortableCaseAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-UnpackagePortableCaseAction.instance"/>
|
||||
<attr name="position" intvalue="103"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-casemodule-CaseCloseAct.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-CaseCloseAction.instance"/>
|
||||
<attr name="position" intvalue="103"/>
|
||||
<attr name="position" intvalue="104"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-casemodule-CaseDeleteAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-CaseDeleteAction.instance"/>
|
||||
<attr name="position" intvalue="104"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-casemodule-UnpackagePortableCaseAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Case/org-sleuthkit-autopsy-casemodule-UnpackagePortableCaseAction.instance"/>
|
||||
<attr name="position" intvalue="105"/>
|
||||
</file>
|
||||
<file name="org-sleuthkit-autopsy-casemodule-AddImage-separatorBefore.instance">
|
||||
|
Loading…
x
Reference in New Issue
Block a user