You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
fix: hide dotfile error on share
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user