Open portable case after decompression

Open a portable case after it is decompressed.
This commit is contained in:
Mark McKinnon 2019-09-25 14:16:51 -04:00
parent c36620e876
commit f6d24a421d
3 changed files with 6 additions and 3 deletions

View File

@ -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=Unpackage and Open Portable Case
EditOptionalCasePropertiesPanel.cancelButton.text=Cancel
EditOptionalCasePropertiesPanel.saveButton.text=Save
GeneralFilter.encaseImageDesc.text=Encase Images (*.e01)

View File

@ -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=Unpackage 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 {

View File

@ -30,6 +30,7 @@ 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.openide.modules.InstalledFileLocator;
import org.openide.util.NbBundle;
import org.openide.windows.WindowManager;
@ -189,6 +190,8 @@ class UnpackagePortableCaseProgressDialog extends javax.swing.JDialog implements
setDisplayError(Bundle.UnpackageWorker_doInBackground_errorCompressingCase());
throw new TskCoreException("Error unpackaging case", ex); // NON-NLS
}
Case.openAsCurrentCase(FilenameUtils.removeExtension(packagedCase) + File.separator + FilenameUtils.getBaseName(packagedCase) + ".aut");
success.set(true);
return null;