Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ func testBreakout(untarFn string, tmpdir string, headers []*tar.Header) error {
if err := os.Mkdir(victim, 0o755); err != nil {
return err
}
// Avoid unrelated ownership failures when the cleaned path remains inside
// dest and requires an implied "victim" directory.
// See https://github.com/moby/go-archive/pull/69#issuecomment-5046037628
if err := os.Mkdir(filepath.Join(dest, "victim"), 0o755); err != nil {
return err
}
hello := filepath.Join(victim, "hello")
helloData, err := time.Now().MarshalText()
if err != nil {
Expand Down
Loading