Skip to content

Commit

Permalink
Second attempt to bandaid hound-search#14. Sorry about that.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellegous committed Jan 29, 2015
1 parent 1183830 commit 4f07a47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hound/searcher/searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"path/filepath"
"regexp"
"runtime"
"strings"
"sync"
"time"
)
Expand Down Expand Up @@ -62,11 +61,12 @@ func expungeOldIndexes(sha, gitDir string) error {
}

for _, dir := range dirs {
if !pat.MatchString(dir) {
bn := filepath.Base(dir)
if !pat.MatchString(bn) || len(bn) != len(name) {
continue
}

if strings.HasSuffix(dir, name) {
if bn == name {
continue
}

Expand Down

0 comments on commit 4f07a47

Please sign in to comment.