mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
7167 check that content is not artifact
This commit is contained in:
parent
45f35b30ef
commit
ab008b2562
@ -25,6 +25,7 @@ import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.TextViewer;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataContentViewerUtility;
|
||||
import org.sleuthkit.autopsy.datamodel.StringContent;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
|
||||
/**
|
||||
@ -81,7 +82,7 @@ public class StringsTextViewer implements TextViewer {
|
||||
return false;
|
||||
}
|
||||
Content content = DataContentViewerUtility.getDefaultContent(node);
|
||||
return (content != null && content.getSize() > 0);
|
||||
return (content != null && !(content instanceof BlackboardArtifact) && content.getSize() > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,6 +46,7 @@ import static org.sleuthkit.autopsy.corecomponents.Bundle.*;
|
||||
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||
import org.sleuthkit.autopsy.datamodel.ContentUtils;
|
||||
import org.sleuthkit.autopsy.datamodel.DataConversion;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
@ -606,7 +607,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
return false;
|
||||
}
|
||||
Content content = DataContentViewerUtility.getDefaultContent(node);
|
||||
return content != null && content.getSize() > 0;
|
||||
return content != null && !(content instanceof BlackboardArtifact) && content.getSize() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -32,9 +32,6 @@ public class DataContentViewerUtility {
|
||||
* preferring to return any Content object other than a BlackboardArtifact
|
||||
* object.
|
||||
*
|
||||
* This method was written with the needs of the hex and strings content
|
||||
* viewers in mind - the algorithm is exactly what those viewers require.
|
||||
*
|
||||
* @param node A display Node object.
|
||||
*
|
||||
* @return If there are multiple Content objects associated with the Node,
|
||||
|
Loading…
x
Reference in New Issue
Block a user