Bump github.com/containers/storage from 1.14.0 to 1.15.1

Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.14.0 to 1.15.1.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.14.0...v1.15.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
This commit is contained in:
dependabot-preview[bot]
2019-11-29 09:16:44 +00:00
committed by Daniel J Walsh
parent 73248bd639
commit 04bc64f593
162 changed files with 43129 additions and 37580 deletions

View File

@@ -16,6 +16,7 @@ import (
"io"
"os"
"path/filepath"
"strings"
"syscall"
"time"
@@ -97,7 +98,7 @@ func legacyCopy(srcFile io.Reader, dstFile io.Writer) error {
func copyXattr(srcPath, dstPath, attr string) error {
data, err := system.Lgetxattr(srcPath, attr)
if err != nil {
if err != nil && err != unix.EOPNOTSUPP {
return err
}
if data != nil {
@@ -271,6 +272,19 @@ func doCopyXattrs(srcPath, dstPath string) error {
return err
}
xattrs, err := system.Llistxattr(srcPath)
if err != nil && err != unix.EOPNOTSUPP {
return err
}
for _, key := range xattrs {
if strings.HasPrefix(key, "user.") {
if err := copyXattr(srcPath, dstPath, key); err != nil {
return err
}
}
}
// We need to copy this attribute if it appears in an overlay upper layer, as
// this function is used to copy those. It is set by overlay if a directory
// is removed and then re-created and should not inherit anything from the