mirror of
https://github.com/containers/skopeo.git
synced 2025-09-11 19:49:40 +00:00
bump containers/image to 2541165
Signed-off-by: Paul Fisher <pfisher@lyft.com>
This commit is contained in:
12
vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go
generated
vendored
12
vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go
generated
vendored
@@ -51,6 +51,9 @@ func WalkN(root string, walkFn WalkFunc, num int) error {
|
||||
var (
|
||||
err error
|
||||
wg sync.WaitGroup
|
||||
|
||||
rootLen = len(root)
|
||||
rootEntry *walkArgs
|
||||
)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
@@ -59,6 +62,11 @@ func WalkN(root string, walkFn WalkFunc, num int) error {
|
||||
close(files)
|
||||
return err
|
||||
}
|
||||
if len(p) == rootLen {
|
||||
// Root entry is processed separately below.
|
||||
rootEntry = &walkArgs{path: p, info: &info}
|
||||
return nil
|
||||
}
|
||||
// add a file to the queue unless a callback sent an error
|
||||
select {
|
||||
case e := <-errCh:
|
||||
@@ -92,6 +100,10 @@ func WalkN(root string, walkFn WalkFunc, num int) error {
|
||||
|
||||
wg.Wait()
|
||||
|
||||
if err == nil {
|
||||
err = walkFn(rootEntry.path, *rootEntry.info, nil)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user