Skip to content

Fix reserved filename sanitization only matching whole base name - #50

Open
stesee wants to merge 1 commit into
releaseV2from
Backportv2
Open

Fix reserved filename sanitization only matching whole base name#50
stesee wants to merge 1 commit into
releaseV2from
Backportv2

Conversation

@stesee

@stesee stesee commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Reserved Windows device names (CON, AUX, NUL, COM1, ...) were being replaced wherever they appeared as a substring anywhere in a filename, instead of only when they formed the entire base name. This mangled ordinary words like ICON, FALCON, CONSOLE and AUXILIARY, and dropped extra characters adjacent to the reserved word instead of leaving them untouched.

Also fixes the reserved-name-with-extension prefix handling, which previously discarded everything after the reserved name (e.g. CON.tar.gz became _CON. instead of _.tar.gz).

Fixes #46

Reserved Windows device names (CON, AUX, NUL, COM1, ...) were being
replaced wherever they appeared as a substring anywhere in a filename,
instead of only when they formed the entire base name. This mangled
ordinary words like ICON, FALCON, CONSOLE and AUXILIARY, and dropped
extra characters adjacent to the reserved word instead of leaving them
untouched.

Also fixes the reserved-name-with-extension prefix handling, which
previously discarded everything after the reserved name (e.g.
CON.tar.gz became _CON. instead of _.tar.gz).

Fixes #46
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