mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 14:19:32 +00:00
4755 ensure exe opening is once again disabled
This commit is contained in:
parent
9d3dd7382d
commit
81b7f9580b
@ -5,6 +5,7 @@ DirectoryTreeTopComponent.componentOpened.groupDataSources.text=This case contai
|
|||||||
DirectoryTreeTopComponent.componentOpened.groupDataSources.title=Group by data source?
|
DirectoryTreeTopComponent.componentOpened.groupDataSources.title=Group by data source?
|
||||||
DirectoryTreeTopComponent.emptyMimeNode.text=Data not available. Run file type identification module.
|
DirectoryTreeTopComponent.emptyMimeNode.text=Data not available. Run file type identification module.
|
||||||
DirectoryTreeTopComponent.resultsView.title=Listing
|
DirectoryTreeTopComponent.resultsView.title=Listing
|
||||||
|
ExternalViewerAction.actionPerformed.failure.exe.message=The file is an executable and will not be opened.
|
||||||
ExternalViewerAction.actionPerformed.failure.IO.message=There is no associated editor for files of this type or the associated application failed to launch.
|
ExternalViewerAction.actionPerformed.failure.IO.message=There is no associated editor for files of this type or the associated application failed to launch.
|
||||||
ExternalViewerAction.actionPerformed.failure.missingFile.message=The file no longer exists.
|
ExternalViewerAction.actionPerformed.failure.missingFile.message=The file no longer exists.
|
||||||
ExternalViewerAction.actionPerformed.failure.open.url=Cannot open URL
|
ExternalViewerAction.actionPerformed.failure.open.url=Cannot open URL
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2018 Basis Technology Corp.
|
* Copyright 2011-2019 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -48,6 +48,7 @@ public class ExternalViewerAction extends AbstractAction {
|
|||||||
private final AbstractFile fileObject;
|
private final AbstractFile fileObject;
|
||||||
private String fileObjectExt;
|
private String fileObjectExt;
|
||||||
final static String[] EXECUTABLE_EXT = {".exe", ".dll", ".com", ".bat", ".msi", ".reg", ".scr", ".cmd"}; //NON-NLS
|
final static String[] EXECUTABLE_EXT = {".exe", ".dll", ".com", ".bat", ".msi", ".reg", ".scr", ".cmd"}; //NON-NLS
|
||||||
|
private boolean isExecutable;
|
||||||
|
|
||||||
ExternalViewerAction(String title, AbstractFile file, boolean isSlackFile) {
|
ExternalViewerAction(String title, AbstractFile file, boolean isSlackFile) {
|
||||||
super(title);
|
super(title);
|
||||||
@ -90,7 +91,19 @@ public class ExternalViewerAction extends AbstractAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Messages({
|
||||||
|
"# {0} - file name",
|
||||||
|
"ExternalViewerAction.actionPerformed.failure.title=Open File Failure {0}",
|
||||||
|
"ExternalViewerAction.actionPerformed.failure.exe.message=The file is an executable and will not be opened."
|
||||||
|
})
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
if (isExecutable) {
|
||||||
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
|
Bundle.ExternalViewerAction_actionPerformed_failure_IO_message(),
|
||||||
|
Bundle.ExternalViewerAction_actionPerformed_failure_title(this.fileObject.getName()),
|
||||||
|
JOptionPane.ERROR_MESSAGE);
|
||||||
|
}
|
||||||
|
|
||||||
// Get the temp folder path of the case
|
// Get the temp folder path of the case
|
||||||
Case openCase;
|
Case openCase;
|
||||||
try {
|
try {
|
||||||
@ -129,8 +142,6 @@ public class ExternalViewerAction extends AbstractAction {
|
|||||||
* @param file the file object
|
* @param file the file object
|
||||||
*/
|
*/
|
||||||
@Messages({
|
@Messages({
|
||||||
"# {0} - file name",
|
|
||||||
"ExternalViewerAction.actionPerformed.failure.title=Open File Failure {0}",
|
|
||||||
"ExternalViewerAction.actionPerformed.failure.IO.message=There is no associated editor for files of this type or the associated application failed to launch.",
|
"ExternalViewerAction.actionPerformed.failure.IO.message=There is no associated editor for files of this type or the associated application failed to launch.",
|
||||||
"ExternalViewerAction.actionPerformed.failure.support.message=This platform (operating system) does not support opening a file in an editor this way.",
|
"ExternalViewerAction.actionPerformed.failure.support.message=This platform (operating system) does not support opening a file in an editor this way.",
|
||||||
"ExternalViewerAction.actionPerformed.failure.missingFile.message=The file no longer exists.",
|
"ExternalViewerAction.actionPerformed.failure.missingFile.message=The file no longer exists.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user