From 5f4a0317ab5685fe4a558df74e604c12e04a1c10 Mon Sep 17 00:00:00 2001 From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com> Date: Thu, 18 Mar 2021 18:24:24 +0000 Subject: [PATCH] fix: hide dotfile error on share --- rules/rules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/rules.go b/rules/rules.go index d8a7f967..7c6ef11b 100644 --- a/rules/rules.go +++ b/rules/rules.go @@ -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.