mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 14:19:32 +00:00
Merge pull request #7123 from gdicristofaro/7806-unsupportedOperation
7806 don't show view source file or result if no associated artifact
This commit is contained in:
commit
b2157e5d90
@ -291,11 +291,18 @@ public class DataResultFilterNode extends FilterNode {
|
|||||||
NbBundle.getMessage(this.getClass(), "DataResultFilterNode.action.viewFileInDir.text"), ban));
|
NbBundle.getMessage(this.getClass(), "DataResultFilterNode.action.viewFileInDir.text"), ban));
|
||||||
}
|
}
|
||||||
} else if (artifactTypeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()) {
|
} else if (artifactTypeID == BlackboardArtifact.ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()) {
|
||||||
|
try {
|
||||||
|
if (ba.getAttribute(BlackboardAttribute.Type.TSK_ASSOCIATED_ARTIFACT) != null) {
|
||||||
//action to go to the source artifact
|
//action to go to the source artifact
|
||||||
actionsList.add(new ViewSourceArtifactAction(DataResultFilterNode_viewSourceArtifact_text(), ba));
|
actionsList.add(new ViewSourceArtifactAction(DataResultFilterNode_viewSourceArtifact_text(), ba));
|
||||||
|
|
||||||
// action to go to the source file of the artifact
|
// action to go to the source file of the artifact
|
||||||
actionsList.add(new ViewContextAction(
|
actionsList.add(new ViewContextAction(
|
||||||
NbBundle.getMessage(this.getClass(), "DataResultFilterNode.action.viewSrcFileInDir.text"), ban));
|
NbBundle.getMessage(this.getClass(), "DataResultFilterNode.action.viewSrcFileInDir.text"), ban));
|
||||||
|
}
|
||||||
|
} catch (TskCoreException ex) {
|
||||||
|
LOGGER.log(Level.WARNING, "Error looking up attributes for artifact with ID=" + ba.getId());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// if the artifact links to another file, add an action to go to
|
// if the artifact links to another file, add an action to go to
|
||||||
// that file
|
// that file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user