diff --git a/src/util-files.ts b/src/util-files.ts index 72570cfa..51e16e4a 100644 --- a/src/util-files.ts +++ b/src/util-files.ts @@ -99,7 +99,7 @@ export async function* dirStream(path: string, { depth=0, onlyFiles=false, onlyF async function getItemsToSkip(path: string) { if (!IS_WINDOWS) return const winPath = path.replace(/\//g, '\\') - const out = await runCmd('dir', ['/ah', '/b', depth ? '/s' : '', winPath]) + const out = await runCmd('dir', ['/ah', '/b', depth ? '/s' : '/c', winPath]) // cannot pass '', so we pass /c as a noop parameter .catch(()=>'') // error in case of no matching file return out.split('\r\n').slice(0,-1).map(x => !depth ? x : x.slice(winPath.length + 1).replace(/\\/g, '/'))