fix: error listing files on Windows in case of no hidden files

Massimo Melina committed Apr 14, 2022 at 12:21 UTC 186bd7fae728cfdde6ed068ba0846efae84c47f9
1 file changed +1
server/src/misc.ts
+1
@@ -252,6 +252,7 @@ export async function* dirStream(path: string) {
252 async function getItemsToSkip(path: string) {
253 if (!IS_WINDOWS) return
254 const out = await run('dir', ['/ah', '/b', path.replace(/\//g, '\\')])
255 + .catch(()=>'') // error in case of no matching file
256 return out.split('\r\n').slice(0,-1)
257 }
258 }