diff --git a/db_diff/tskdbdiff.py b/db_diff/tskdbdiff.py index 01ff0b9f3b35db13e2b6ef518c11f71df78846ff..ea649cd85a52ed8ffa6b07a4c6a8f8410adb665a 100644 --- a/db_diff/tskdbdiff.py +++ b/db_diff/tskdbdiff.py @@ -999,18 +999,27 @@ def normalize_tsk_objects_path(guid_util: TskGuidUtils, objid: int, path_parts = path_parts[:-1] if path_parts and len(path_parts) >= 2: - for idx in range(0, len(path_parts) - 1): - if path_parts[idx].lower() == "reports" and \ - path_parts[idx + 1].lower().startswith("autopsytestcase html report"): - path_parts = ["Reports", "AutopsyTestCase HTML Report"] - break - if path_parts[idx].lower() == "reports" and \ - "html report" in path_parts[idx + 1].lower() and \ - len(path_parts) > idx + 2 and \ - path_parts[idx + 2].lower().endswith("report.html"): - path_parts = ["Reports", "html-report.html"] + is_leapp = False + for leapp_module in ['aleapp', 'ileapp']: + if len(path_parts) > 0 and path_parts[1].lower() == leapp_module and \ + path_parts[-1].lower() == 'index.html': + path_parts = ['ModuleOutput', leapp_module, 'index.html'] + is_leapp = True break + if not is_leapp: + for idx in range(0, len(path_parts) - 1): + if path_parts[idx].lower() == "reports" and \ + path_parts[idx + 1].lower().startswith("autopsytestcase html report"): + path_parts = ["Reports", "AutopsyTestCase HTML Report"] + break + if path_parts[idx].lower() == "reports" and \ + "html report" in path_parts[idx + 1].lower() and \ + len(path_parts) > idx + 2 and \ + path_parts[idx + 2].lower().endswith("report.html"): + path_parts = ["Reports", "html-report.html"] + break + path = os.path.join(*path_parts) if len(path_parts) > 0 else '/' return path