mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 09:47:42 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
dd9cae8c5b
@ -157,7 +157,7 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer
|
||||
|
||||
@Override
|
||||
public String getToolTip() {
|
||||
return "";
|
||||
return "Displays metadata about the file.";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,6 +33,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute;
|
||||
import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.Image;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
import org.sleuthkit.datamodel.TskException;
|
||||
|
||||
@ -140,7 +141,12 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
} else {
|
||||
String dataSource = "";
|
||||
try {
|
||||
dataSource = associated.getImage().getName();
|
||||
Image image = associated.getImage();
|
||||
if (image != null) {
|
||||
dataSource = image.getName();
|
||||
} else {
|
||||
dataSource = getRootParentName();
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Failed to get image name from " + associated.getName());
|
||||
}
|
||||
@ -153,6 +159,20 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
private String getRootParentName() {
|
||||
String parentName = associated.getName();
|
||||
Content parent = associated;
|
||||
try {
|
||||
while ((parent = parent.getParent()) != null) {
|
||||
parentName = parent.getName();
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.WARNING, "Failed to get parent name from " + associated.getName());
|
||||
return "";
|
||||
}
|
||||
return parentName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an additional custom node property to that node before it is
|
||||
|
@ -432,7 +432,7 @@ public class ExtractedContentViewer implements DataContentViewer {
|
||||
}
|
||||
}
|
||||
if (msg == null) {
|
||||
msg = "<p style='font-style:italic'>" + name + "does not have text in the index.<br/>It may have no text, not been analyzed yet, or keyword search was not enabled during ingest.</p>";
|
||||
msg = "<p style='font-style:italic'>" + name + " does not have text in the index.<br/>It may have no text, not been analyzed yet, or keyword search was not enabled during ingest.</p>";
|
||||
}
|
||||
String htmlMsg = "<span style='font-style:italic'>" + msg + "</span>";
|
||||
return htmlMsg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user