From d7db23d58cb9dd0fc9aa80e1e68f10c5e9925c04 Mon Sep 17 00:00:00 2001 From: brent saner Date: Wed, 27 Aug 2025 19:20:44 -0400 Subject: [PATCH] v1.14.2 FIXED: * Small comparison issue in a couple libs based on recent discovery in r00t2.io/goutils/bitmask --- fsutils/funcs_linux.go | 1 + go.mod | 4 ++-- go.sum | 5 +++++ paths/funcs_fssearchcriteria.go | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fsutils/funcs_linux.go b/fsutils/funcs_linux.go index 473ed71..2913c9d 100644 --- a/fsutils/funcs_linux.go +++ b/fsutils/funcs_linux.go @@ -118,6 +118,7 @@ func unsetAttrs(f *os.File, attrs fsAttr) (err error) { } ab = bitmask.MaskBit(curAttrs) + // TODO: Should this be IsOneOf instad of HasFlag? if !ab.HasFlag(bitmask.MaskBit(attrs)) { return } diff --git a/go.mod b/go.mod index 214c90a..3c3d5e1 100644 --- a/go.mod +++ b/go.mod @@ -10,13 +10,13 @@ require ( golang.org/x/sync v0.16.0 golang.org/x/sys v0.35.0 honnef.co/go/augeas v0.0.0-20161110001225-ca62e35ed6b8 - r00t2.io/goutils v1.9.4 + r00t2.io/goutils v1.9.6 ) require ( github.com/ebitengine/purego v0.8.4 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect + github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/tklauser/go-sysconf v0.3.15 // indirect github.com/tklauser/numcpus v0.10.0 // indirect diff --git a/go.sum b/go.sum index 10433dc..124e109 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,8 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaU github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 h1:PpXWgLPs+Fqr325bN2FD2ISlRRztXibcX6e8f5FR5Dc= github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54 h1:mFWunSatvkQQDhpdyuFAYwyAan3hzCuma+Pz8sqvOfg= +github.com/lufia/plan9stats v0.0.0-20250827001030-24949be3fa54/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= @@ -49,3 +51,6 @@ r00t2.io/goutils v1.9.3 h1:pR9Ggu5JBpVjfrqNBrZg9bZpKan0TCcwt3MXrSdkhLo= r00t2.io/goutils v1.9.3/go.mod h1:76AxpXUeL10uFklxRB11kQsrtj2AKiNm8AwG1bNoBCA= r00t2.io/goutils v1.9.4 h1:+Bm72mKhgXs6DRtU3P4sBjqUNwAKAFfdF9lx5bomwQY= r00t2.io/goutils v1.9.4/go.mod h1:76AxpXUeL10uFklxRB11kQsrtj2AKiNm8AwG1bNoBCA= +r00t2.io/goutils v1.9.5 h1:tIBtXKbGPLCkdhHZSESdTZ2QzC1e+8jDToNr/BauWe0= +r00t2.io/goutils v1.9.5/go.mod h1:76AxpXUeL10uFklxRB11kQsrtj2AKiNm8AwG1bNoBCA= +r00t2.io/goutils v1.9.6/go.mod h1:76AxpXUeL10uFklxRB11kQsrtj2AKiNm8AwG1bNoBCA= diff --git a/paths/funcs_fssearchcriteria.go b/paths/funcs_fssearchcriteria.go index 8a51d2c..5c99278 100644 --- a/paths/funcs_fssearchcriteria.go +++ b/paths/funcs_fssearchcriteria.go @@ -111,7 +111,7 @@ func (f *FsSearchCriteria) Match(path string, d fs.DirEntry, fi fs.FileInfo) (ma miss = &m return } else if typeMode != 0 { - if !typeFilter.HasFlag(bitmask.MaskBit(typeMode)) { + if !typeFilter.IsOneOf(bitmask.MaskBit(typeMode)) { m.MissReason = MissType miss = &m return