fix reading directories

This commit is contained in:
DetachHead
2020-12-26 23:26:27 +10:00
parent 733b470f1f
commit 1e64e52298

View File

@@ -189,7 +189,7 @@ async function getInputFiles(paths) {
for (const path of paths) {
//allow paths ending in / of \ to get all files in that directory
const files = path.endsWith('/') || path.endsWith('\\')
? await fs.readdir(paths)
? (await fsp.readdir(path)).map(file => join(path, file))
: [path];
for (const file of files) {
try {