Skip to content

Harden unicode/exif handling and sanitize generated paths#509

Open
TerryFrench wants to merge 1 commit intojmathai:masterfrom
TerryFrench:pr/02-unicode-path
Open

Harden unicode/exif handling and sanitize generated paths#509
TerryFrench wants to merge 1 commit intojmathai:masterfrom
TerryFrench:pr/02-unicode-path

Conversation

@TerryFrench
Copy link
Copy Markdown
Contributor

Summary

This PR improves import robustness for files with unicode metadata and for generated output names that contain path-unsafe characters.

Changes

  • Harden ExifTool/media metadata handling to avoid crashes on unicode decode edge cases.
  • Sanitize generated file/folder path components to prevent invalid separators and invalid filename characters (especially important on Windows).
  • Add regression tests for:
    • non-ASCII filename/exif handling
    • generated-name/path sanitization

Why

Some real-world media contains unicode values and title/location text that can produce invalid paths or trigger metadata parsing failures. This caused imports to fail on certain files.

Scope

  • Focused on resilience and cross-platform path safety.
  • No intentional behavior change for normal/valid metadata values.

Validation

  • Local test run: 338 passed, 4 skipped, 1 xfailed (warnings only).

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