This commit is contained in:
Greg DiCristofaro 2021-05-04 12:30:51 -04:00
parent c41f2a2255
commit dbc0fba5bc

View File

@ -160,7 +160,9 @@ abstract class Extract {
*/ */
BlackboardArtifact createArtifactWithAttributes(BlackboardArtifact.Type type, Content content, Collection<BlackboardAttribute> attributes) throws TskCoreException { BlackboardArtifact createArtifactWithAttributes(BlackboardArtifact.Type type, Content content, Collection<BlackboardAttribute> attributes) throws TskCoreException {
if (type.getCategory() == BlackboardArtifact.Category.DATA_ARTIFACT) { if (type.getCategory() == BlackboardArtifact.Category.DATA_ARTIFACT) {
return content.newDataArtifact(type, attributes); return (content instanceof AbstractFile)
? ((AbstractFile) content).newDataArtifact(type, attributes)
: content.newDataArtifact(type, attributes, null);
} else { } else {
BlackboardArtifact bbart = content.newArtifact(type.getTypeID()); BlackboardArtifact bbart = content.newArtifact(type.getTypeID());
bbart.addAttributes(attributes); bbart.addAttributes(attributes);