aboutsummaryrefslogtreecommitdiffstats
path: root/glob
diff options
context:
space:
mode:
Diffstat (limited to 'glob')
-rw-r--r--glob/glob.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/glob/glob.go b/glob/glob.go
index a8c348d9..a07501a0 100644
--- a/glob/glob.go
+++ b/glob/glob.go
@@ -65,7 +65,12 @@ func GlobWithDepFile(glob, fileListFile, depFile string, excludes []string) (fil
}
if match {
for _, e := range excludes {
- excludeMatch, err := filepath.Match(e, info.Name())
+ var excludeMatch bool
+ if filepath.Base(e) == e {
+ excludeMatch, err = filepath.Match(e, info.Name())
+ } else {
+ excludeMatch, err = filepath.Match(e, path)
+ }
if err != nil {
return err
}