summaryrefslogtreecommitdiff
path: root/src/pkg/path/filepath/match.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/path/filepath/match.go')
-rw-r--r--src/pkg/path/filepath/match.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pkg/path/filepath/match.go b/src/pkg/path/filepath/match.go
index a05bb5f7e..9c344309d 100644
--- a/src/pkg/path/filepath/match.go
+++ b/src/pkg/path/filepath/match.go
@@ -124,9 +124,8 @@ func matchChunk(chunk, s string) (rest string, ok bool, err os.Error) {
s = s[n:]
chunk = chunk[1:]
// possibly negated
- notNegated := true
- if len(chunk) > 0 && chunk[0] == '^' {
- notNegated = false
+ negated := chunk[0] == '^'
+ if negated {
chunk = chunk[1:]
}
// parse all ranges
@@ -152,7 +151,7 @@ func matchChunk(chunk, s string) (rest string, ok bool, err os.Error) {
}
nrange++
}
- if match != notNegated {
+ if match == negated {
return
}