Skip to content

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

Merged
stesee merged 1 commit into
releaseV2from
Backportv2
Sep 2, 2026
Merged

stesee merged 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
@stesee
stesee merged commit 4534de4 into releaseV2 Sep 2, 2026
8 of 11 checks passed
@stesee
stesee deleted the Backportv2 branch September 2, 2026 20:02
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant