mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
fix reading directories
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user