« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/crawlers.js
diff options
context:
space:
mode:
Diffstat (limited to 'crawlers.js')
-rw-r--r--crawlers.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawlers.js b/crawlers.js
index 8ba70f3..61f422b 100644
--- a/crawlers.js
+++ b/crawlers.js
@@ -219,6 +219,10 @@ function crawlLocal(dirPath, extensions = [
         }
       })
     }))
+  }, err => {
+    if (err.code === 'ENOENT') {
+      return []
+    }
   }).then(items => items.filter(Boolean))
     .then(filteredItems => ({items: filteredItems}))
 }