diff --git a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java index 7b2e6724a6..7abee7af3d 100644 --- a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java +++ b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java @@ -1436,6 +1436,11 @@ private String handleAttachment(Item item) { // Replace extracted path by attached file's local path extracted_path = ufedFileIdToLocalPath.get(item.getMetadata().get(FILE_ID_ATTR)); } + + // if extracted_path does not reference a ufedId, use the ufedId of attached file + if (ufedId == null && ufedFileIdToLocalPath.containsKey(item.getMetadata().get(FILE_ID_ATTR))) { + ufedId = item.getMetadata().get(FILE_ID_ATTR); + } } setContent(item, extracted_path);