From 72a96d600274cd5ad9f0c405370e84e7c99de570 Mon Sep 17 00:00:00 2001 From: Oliver Spohngellert Date: Thu, 24 Mar 2016 15:15:23 -0400 Subject: [PATCH] Made tagged results data work for all reports. --- .../sleuthkit/autopsy/report/ReportGenerator.java | 12 ++++++++++++ .../src/org/sleuthkit/autopsy/report/ReportHTML.java | 9 --------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java index 38a5931427..1f49588837 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java @@ -655,6 +655,18 @@ class ReportGenerator { } ArrayList rowData = new ArrayList<>(Arrays.asList(tag.getName().getDisplayName(), fileName, tag.getComment())); + Content content = tag.getContent(); + if (content instanceof AbstractFile) { + AbstractFile file = (AbstractFile) content; + + // Add metadata about the file to HTML output + rowData.add(file.getMtimeAsDate()); + rowData.add(file.getCtimeAsDate()); + rowData.add(file.getAtimeAsDate()); + rowData.add(file.getCrtimeAsDate()); + rowData.add(Long.toString(file.getSize())); + rowData.add(file.getMd5Hash()); + } for (TableReportModule module : tableModules) { // @@@ This casting is a tricky little workaround to allow the HTML report module to slip in a content hyperlink. if (module instanceof ReportHTML) { diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index 196f770ca7..eeca1efe56 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -560,15 +560,6 @@ class ReportHTML implements TableReportModule { return; } AbstractFile file = (AbstractFile) content; - - // Add metadata about the file to HTML output - row.add(file.getMtimeAsDate()); - row.add(file.getCtimeAsDate()); - row.add(file.getAtimeAsDate()); - row.add(file.getCrtimeAsDate()); - row.add(Long.toString(file.getSize())); - row.add(file.getMd5Hash()); - // Add the hyperlink to the row. A column header for it was created in startTable(). StringBuilder localFileLink = new StringBuilder(); // Don't make a local copy of the file if it is a directory or unallocated space.