From f52a7f3650fc0d2a2f25b74f6e123b38e74cb052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berenguel?= Date: Fri, 19 Jul 2024 04:59:40 -0300 Subject: [PATCH] #2262: if extracted_path does not reference a ufedId, use the ufedId of attached file --- .../src/main/java/iped/engine/datasource/UfedXmlReader.java | 5 +++++ 1 file changed, 5 insertions(+) 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 a5b307b0eb..556c0f0afa 100644 --- a/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java +++ b/iped-engine/src/main/java/iped/engine/datasource/UfedXmlReader.java @@ -1413,6 +1413,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);