Skip to content

image_layer: place a single file under a trailing-slash srcs key by b…#579

Merged
malt3 merged 1 commit into
mainfrom
single-file-under-dir
Jun 25, 2026
Merged

image_layer: place a single file under a trailing-slash srcs key by b…#579
malt3 merged 1 commit into
mainfrom
single-file-under-dir

Conversation

@malt3

@malt3 malt3 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

…asename

A srcs key ending in "/" denotes a directory. For a multi-output target the trailing slash was already normalized away, but a single-file src used the key verbatim as the tar entry name, which the layer tool rejected with "invalid node header: /". Now a single file under a directory key is placed inside it by basename, matching the multi-file directory semantics (and layer_from_binary's trailing-slash path handling).

Extends the tests/layering/testcases/trailing_slash case to cover a single file placed at a trailing-slash key.

…asename

A srcs key ending in "/" denotes a directory. For a multi-output target the
trailing slash was already normalized away, but a single-file src used the key
verbatim as the tar entry name, which the layer tool rejected with
"invalid node header: <path>/". Now a single file under a directory key is
placed inside it by basename, matching the multi-file directory semantics (and
layer_from_binary's trailing-slash path handling).

Extends the tests/layering/testcases/trailing_slash case to cover a single file
placed at a trailing-slash key.
@malt3 malt3 added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit 6ac776a Jun 25, 2026
8 checks passed
@malt3 malt3 deleted the single-file-under-dir branch June 25, 2026 14:38
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