Skip to content

fix(media): preserve attachment paths to avoid filename collisions - #5

Merged
freanocank merged 1 commit into
freanocank:mainfrom
ShiTan-677:fix/media-export-collisions
Oct 13, 2026
Merged

freanocank merged 1 commit into
freanocank:mainfrom
ShiTan-677:fix/media-export-collisions

Conversation

@ShiTan-677

@ShiTan-677 ShiTan-677 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

The media exporter recursively discovers files but copies them into flat folders using only the basename. Two attachments named same-name in different source directories are reported as two exports while only one survives. Documents, videos and cache images are all affected.

Preserve each file's relative source directory under docs/, videos/ or images/. Root-level files keep their previous paths, and cache images still receive the detected .jpg/.png suffix. Encrypted .dat images continue to be counted and skipped.

Validation on macOS / Python 3.12:

  • The three synthetic collision regressions failed before the fix, each reporting two exports but retaining one file.
  • python -m pytest -q: 87 passed, 1 skipped.
  • Tests verify that both distinct payloads survive for documents, videos and cache images, that root-level paths remain usable, and that encrypted originals are still skipped.
  • Compilation, macOS shell syntax and six-tool MCP loading checks passed.

This is an independent CLI export fix; it does not implement encrypted-image decoding or transcript-to-image association. Only synthetic files are used.

The fork CI matrix passed on macOS and Windows with Python 3.10 and 3.13: run 38035161436. The upstream fork-PR workflow still requires maintainer approval.

@freanocank
freanocank merged commit 0fa990d into freanocank:main Oct 13, 2026
1 check passed
@freanocank

Copy link
Copy Markdown
Owner

Thanks for the fix and regression tests. Adopted through #15 with your original commits preserved. The collision regressions retain distinct document, video and cache-image payloads.

The combined suite passes all four macOS/Windows × Python 3.10/3.13 CI jobs; Windows reports 209 passed, and macOS reports 208 passed with the Windows-only test skipped.

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.

2 participants