mirror of
https://github.com/IllusionMan1212/ffui.git
synced 2026-10-24 02:12:35 +00:00
fix: skip nested directories
This commit is contained in:
@@ -109,6 +109,10 @@ func (m *model) statFile() tea.Msg {
|
|||||||
for _, entry := range entries {
|
for _, entry := range entries {
|
||||||
fullFilePath := filepath.Join(m.Path, entry.Name())
|
fullFilePath := filepath.Join(m.Path, entry.Name())
|
||||||
|
|
||||||
|
if entry.IsDir() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
mType, err := mimetype.DetectFile(fullFilePath)
|
mType, err := mimetype.DetectFile(fullFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user