Skip to content

Commit

Permalink
fix: hide dotfile error on share
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiresviana committed Mar 18, 2021
1 parent 22f4be8 commit 5f4a031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5f4a031

Please sign in to comment.