Import: Ignore dot files listed in .ppignore #1348
This commit is contained in:
parent
07c711a0b4
commit
97c3e0abe8
1 changed files with 6 additions and 6 deletions
|
@ -45,7 +45,7 @@ func (i IgnoreItem) Ignore(dir, base string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// IgnoreItem represents a list of name patterns to be ignored.
|
||||
// IgnoreList represents a list of name patterns to be ignored.
|
||||
type IgnoreList struct {
|
||||
Log IgnoreLogFunc
|
||||
items []IgnoreItem
|
||||
|
@ -144,11 +144,6 @@ func (l *IgnoreList) Ignore(fileName string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
if l.ignoreHidden && strings.HasPrefix(filepath.Base(fileName), ".") {
|
||||
l.hiddenFiles = append(l.hiddenFiles, fileName)
|
||||
return true
|
||||
}
|
||||
|
||||
for _, item := range l.items {
|
||||
if item.Ignore(dir, base) {
|
||||
l.ignoredFiles = append(l.ignoredFiles, fileName)
|
||||
|
@ -161,5 +156,10 @@ func (l *IgnoreList) Ignore(fileName string) bool {
|
|||
}
|
||||
}
|
||||
|
||||
if l.ignoreHidden && strings.HasPrefix(filepath.Base(fileName), ".") {
|
||||
l.hiddenFiles = append(l.hiddenFiles, fileName)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue