Skip to content

Handle explicit directory entries during update archive unpacking#520

Merged
ryanfowler merged 1 commit into
mainfrom
fix-archive-unpacking-errors
May 12, 2026
Merged

Handle explicit directory entries during update archive unpacking#520
ryanfowler merged 1 commit into
mainfrom
fix-archive-unpacking-errors

Conversation

@ryanfowler
Copy link
Copy Markdown
Owner

Summary

  • Use MkdirAll for explicit directory entries in the Unix and Windows unpackers so archives with predeclared directories extract cleanly.
  • Add os.O_TRUNC when writing Unix regular files to avoid leaving stale bytes behind on overwrite.
  • Cover both cases with regression tests for explicit directory entries, plus a Unix truncation test.

Testing

  • go test -v ./internal/update
  • go test ./...

@ryanfowler ryanfowler enabled auto-merge May 12, 2026 01:18
@ryanfowler ryanfowler force-pushed the fix-archive-unpacking-errors branch from 6c3ee35 to 2341f78 Compare May 12, 2026 01:26
@ryanfowler ryanfowler merged commit fb160fc into main May 12, 2026
10 checks passed
@ryanfowler ryanfowler deleted the fix-archive-unpacking-errors branch May 12, 2026 01:28
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