Skip to content

Fix sanitize_map_name to match Windows filename rules#46

Merged
danmaps merged 1 commit into
mainfrom
fix/sanitize-map-name
Mar 16, 2026
Merged

Fix sanitize_map_name to match Windows filename rules#46
danmaps merged 1 commit into
mainfrom
fix/sanitize-map-name

Conversation

@danmaps
Copy link
Copy Markdown
Owner

@danmaps danmaps commented Mar 1, 2026

Summary\n- Make sanitize_map_name() replace the full Windows-invalid filename set (including ASCII control chars) and collapse whitespace.\n- Add pytest coverage for invalid chars, control chars, truncation, and fallback behavior.\n\n## Why\nProExporter writes map images using sanitized names. If the CLI sanitization is less strict than Windows rules (or the C# logic), it can lead to mismatches when looking up map image filenames.\n\n## Testing\n- python -m pytest\n

@danmaps danmaps merged commit f7f9582 into main Mar 16, 2026
5 checks passed
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