Files
reverse-engineering-anything/.github
morluto 61f1dede46 fix(resources)!: refuse Windows names ending in a dot or space (#15653)
* fix(resources)!: refuse Windows names ending in a dot or space

Node writes files through `\\?\` paths on Windows, so a member named
`dir/name.` or `dir/space ` is created literally. Win32 path
normalization drops a trailing dot or space when other programs open
the path, so `dir\name.` reads the bytes of a sibling `dir\name`, and
`dir\space ` cannot be opened. The extraction manifest then records a
digest for a path that ordinary tools resolve to different bytes.

A Windows output tree now refuses any path segment that ends in a dot
or space with DestinationPathUnrepresentableFailure, before creating
the path, using the trailing rule isPortablePathSegment already
applies. The refusal names the cause and the next step. Reserved device
names stay accepted, since Node creates them as ordinary files.

Every writer that materializes target-derived names goes through
SafeOutputTree (extract_artifact, firmware and UEFI publication,
desktop export, environment bundles, recovered JavaScript sources, web
script export), so all of them apply the rule. Web script export
already moves an unrepresentable URL path to its isolated layout.

Fixes #15613

BREAKING CHANGE: On Windows, extract_artifact and other output-tree
writers now refuse a path with a segment ending in a dot or space,
where they used to write it. To extract the rest of such an archive on
Windows, select occurrence_ids that leave those members out, or extract
on a non-Windows host. Web script export on Windows writes such URL
paths under its isolated layout instead.

* ci: run Windows extraction name tests in the curated Windows lane
2026-12-01 19:33:46 -05:00
..