Fix LayerBuilder crash on Windows: absolute root path in tar headers#3
Conversation
On Windows, Path::is_absolute() requires a drive letter, so Unix-style paths like "/app/foo" aren't detected as absolute. normalize_archive_path now strips leading '/' via string check as a fallback, and ensure_parent_dirs_exist skips the root "/" path as a safety net. Closes ALIEN-13 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ALIEN-13 Fix LayerBuilder crash on Windows: absolute root path in tar directory headers
BugWhen building an OCI image on Windows using ErrorRoot cause
FixTwo changes in
ReproBuild any Rust function on Windows via |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Summary
Path::is_absolute()requires a drive letter, so Unix-style paths like/app/foopass throughnormalize_archive_pathunchanged.ensure_parent_dirs_existthen walks ancestors up to/, which thetarcrate rejects as non-relative.normalize_archive_pathnow strips leading/via string check as a fallback for Windows.ensure_parent_dirs_existskips the root"/"path as a safety net.Closes ALIEN-13
Test plan
layertests passx86_64-pc-windows-gnutarget🤖 Generated with Claude Code