8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3a4d03 commit 8f64347Copy full SHA for 8f64347
lib/internal/fs/glob.js
@@ -331,10 +331,7 @@ class Glob {
331
const fullpath = resolve(this.#root, path);
332
333
// If path is a directory, add trailing slash and test patterns again.
334
- // TODO(Trott): Would running #isExcluded() first and checking isDirectory() only
335
- // if it matches be more performant in the typical use case? #isExcluded()
336
- // is often ()=>false which is about as optimizable as a function gets.
337
- if (this.#cache.statSync(fullpath).isDirectory() && this.#isExcluded(`${fullpath}/`)) {
+ if (this.#isExcluded(`${fullpath}/`) && this.#cache.statSync(fullpath).isDirectory()) {
338
return;
339
}
340
0 commit comments