summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/selinux/pkg/pwalk
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-10-07 12:28:55 +0000
committerGitHub <noreply@github.com>2021-10-07 12:28:55 +0000
commitda8e4cdeb440f0aa0cfb3d0a6eb2e88b89ddb4cb (patch)
tree643ebf150d8feefd72543f260ffbbb6daeb7b62d /vendor/github.com/opencontainers/selinux/pkg/pwalk
parentbfb904bb23c53773a4414ccf4b1f66cf05d9ee80 (diff)
downloadpodman-da8e4cdeb440f0aa0cfb3d0a6eb2e88b89ddb4cb.tar.gz
podman-da8e4cdeb440f0aa0cfb3d0a6eb2e88b89ddb4cb.tar.bz2
podman-da8e4cdeb440f0aa0cfb3d0a6eb2e88b89ddb4cb.zip
Bump github.com/opencontainers/selinux from 1.8.5 to 1.9.1
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.8.5 to 1.9.1. - [Release notes](https://github.com/opencontainers/selinux/releases) - [Commits](https://github.com/opencontainers/selinux/compare/v1.8.5...v1.9.1) --- updated-dependencies: - dependency-name: github.com/opencontainers/selinux dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/opencontainers/selinux/pkg/pwalk')
-rw-r--r--vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go b/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go
index 011fe862a..202c80da5 100644
--- a/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go
+++ b/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go
@@ -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
}