fix: hide dotfile error on share

This commit is contained in:
Ramires Viana 2021-03-18 18:24:24 +00:00
parent 22f4be8f54
commit 5f4a0317ab
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ type Rule struct {
// MatchHidden matches paths with a basename
// that begins with a dot.
func MatchHidden(path string) bool {
return strings.HasPrefix(filepath.Base(path), ".")
return path != "" && strings.HasPrefix(filepath.Base(path), ".")
}
// Matches matches a path against a rule.