fix: skip nested directories

This commit is contained in:
2022-03-20 16:04:12 +02:00
parent 8ad8fbbced
commit 9d85d5a496
+4
View File
@@ -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)