diff options
author | Florrie <towerofnix@gmail.com> | 2018-06-12 23:05:00 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-06-12 23:05:00 -0300 |
commit | c3628a57bc43492e32b9251750865e41d68efea0 (patch) | |
tree | ddc63ccd4c05cd6420a9403f6df54b0528f85474 | |
parent | 70d6ea774ce47ca1a12cde8040c345de49beb29b (diff) |
Return empty playlist for nonexistant directories
-rw-r--r-- | crawlers.js | 4 |
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})) } |