fix check in housekeeping not checking the actual no-build list

This commit is contained in:
2025-01-26 20:14:16 +01:00
parent 2e080c8268
commit 1c90e20a10
3 changed files with 9 additions and 19 deletions

View File

@@ -699,17 +699,18 @@ func (globs Globs) Expand() ([]string, error) {
return matches, nil
}
func MatchGlobList(target string, globs []string) (bool, error) {
func MatchGlobList(target string, globs []string) bool {
for _, lGlob := range globs {
tGlob, err := glob.Compile(lGlob)
if err != nil {
return false, fmt.Errorf("failed to compile glob %s: %w", lGlob, err)
log.Warningf("failed to compile glob %s: %v", lGlob, err)
return false
}
if tGlob.Match(target) {
return true, nil
return true
}
}
return false, nil
return false
}
func Copy(srcPath, dstPath string) (err error) {