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
11 changes: 10 additions & 1 deletion pkg/archive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,19 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, L
}
}

var errors []string
for key, value := range hdr.Xattrs {
if err := system.Lsetxattr(path, key, []byte(value), 0); err != nil {
return err
// We ignore errors here because not all graphdrivers support xattrs.
errors = append(errors, err.Error())
}

}

if len(errors) > 0 {
logrus.WithFields(logrus.Fields{
"errors": errors,
}).Warn("ignored xattrs in archive: underlying filesystem doesn't support them")
}

// There is no LChmod, so ignore mode for symlink. Also, this
Expand Down