Open stubar opened 6 years ago
Same issue for not specifying options.
Ran into the same issue which caused a security problem (files returned that should not have been).
Encountered this problem as well, unfortunately I had to switch to https://github.com/isaacs/node-glob
A workaround is to create a new instance of the Glob
object each time you match a pattern, like:
const glob = require('glob-fs')
glob().use(..).readdir(..)
If I call
globFs.readdirSync(path, {cwd: '/'})
multiple times I get a different array each time. The file list is being added to the last response each time.Note I'm using the cwd param because I'm passing in absolute paths.