Skip to content

Keep the ingest path out of the CSV, HTML, KML and JSON exports - #26

Merged
abrignoni merged 1 commit into
mainfrom
fix/export-paths-relative
Sep 3, 2026
Merged

abrignoni merged 1 commit into
mainfrom
fix/export-paths-relative

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Keeps the ingest path out of the CSV, HTML, KML and JSON exports.

files.path is the absolute path as ingested: the evidence folder for a folder source, the case's staged folder for an archive row. It is a location on the machine the case was made on, and it was reaching every export.

  • _disp_path prefers rel_path for a folder source, as its docstring already said; the CSV file_path column, the HTML Path field and the KML description all read it. A row with no rel_path falls back to the file name.
  • the JSON export drops files.path from each row and keeps rel_path, orig_path and file_path
  • tests/test_export_paths.py runs the pipeline on synthetic files, writes the HTML, CSV, JSON, MD5 and KMZ outputs, and asserts none of them names the temp root or the evidence folder while the relative paths are still there; it fails against the previous code

This changes the CSV file_path column and the HTML Path field for folder-source cases from the absolute ingest path to the path within the source.

🤖 Generated with Claude Code

files.path is the absolute path as ingested: the evidence folder for a folder
source, the case's staged folder for an archive row. It is a location on the
machine the case was made on, and it was reaching every export.

_disp_path now prefers rel_path for a folder source, which is what its docstring
promised; the CSV file_path column, the HTML Path field and the KML description
all read it. A row with no rel_path falls back to the file name. The JSON export
drops files.path from each row and keeps rel_path, orig_path and file_path.

tests/test_export_paths.py runs the pipeline on synthetic files under folders
whose names hold a space, writes the HTML, CSV, JSON, MD5 and KMZ outputs, and
asserts none of them names the temp root or the evidence folder, with the
relative paths still present. It fails against the previous code.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@abrignoni
abrignoni merged commit 04e794b into main Sep 3, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/export-paths-relative branch September 3, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant