🔧
This commit is contained in:
5
node_modules/fdir/dist/api/walker.js
generated
vendored
5
node_modules/fdir/dist/api/walker.js
generated
vendored
@@ -53,7 +53,7 @@ class Walker {
|
||||
this.callbackInvoker = invokeCallback.build(options, this.isSynchronous);
|
||||
this.root = (0, utils_1.normalizePath)(root, options);
|
||||
this.state = {
|
||||
root: this.root.slice(0, -1),
|
||||
root: (0, utils_1.isRootDirectory)(this.root) ? this.root : this.root.slice(0, -1),
|
||||
// Perf: we explicitly tell the compiler to optimize for String arrays
|
||||
paths: [""].slice(0, 0),
|
||||
groups: [],
|
||||
@@ -104,7 +104,8 @@ class Walker {
|
||||
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
|
||||
if (stat.isDirectory()) {
|
||||
resolvedPath = (0, utils_1.normalizePath)(resolvedPath, this.state.options);
|
||||
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator))
|
||||
if (exclude &&
|
||||
exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator))
|
||||
return;
|
||||
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user