From 9d85d5a49600dfc8989022169687c453a239e59c Mon Sep 17 00:00:00 2001 From: IllusionMan1212 Date: Sun, 20 Mar 2022 16:04:12 +0200 Subject: [PATCH] fix: skip nested directories --- app.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.go b/app.go index 8c1693b..5c10a4e 100644 --- a/app.go +++ b/app.go @@ -109,6 +109,10 @@ func (m *model) statFile() tea.Msg { for _, entry := range entries { fullFilePath := filepath.Join(m.Path, entry.Name()) + if entry.IsDir() { + continue + } + mType, err := mimetype.DetectFile(fullFilePath) if err != nil { log.Fatal(err)