Commit 5006627
fs: apply exclude function to root path
In at least some situations, the root path was
being added to the results of globbing even if
it matched the optional exclude function.
In the relevant test file, a variable was renamed
for consistency. (There was a patterns and pattern2,
rather than patterns2.) The test case is added to
patterns2.
Fixes: #56260
PR-URL: #57420
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 6ee15c6 commit 5006627Copy full SHA for 5006627
File tree
Expand file treeCollapse file tree
2 files changed
+33
-5
lines changedOpen diff view settings
Filter options
- lib/internal/fs
- test/parallel
Expand file treeCollapse file tree
2 files changed
+33
-5
lines changedOpen diff view settings
Collapse file
+25-1Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
| 12 | + |
12 | 13 | |
13 | 14 | |
14 | 15 | |
| ||
125 | 126 | |
126 | 127 | |
127 | 128 | |
128 | | - |
| 129 | + |
| 130 | + |
129 | 131 | |
130 | 132 | |
131 | 133 | |
| ||
326 | 328 | |
327 | 329 | |
328 | 330 | |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
| 339 | + |
| 340 | + |
| 341 | + |
| 342 | + |
| 343 | + |
| 344 | + |
| 345 | + |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
| 350 | + |
| 351 | + |
| 352 | + |
329 | 353 | |
330 | 354 | |
331 | 355 | |
|
Collapse file
test/parallel/test-fs-glob.mjs
Copy file name to clipboardExpand all lines: test/parallel/test-fs-glob.mjs+8-4Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
388 | 388 | |
389 | 389 | |
390 | 390 | |
391 | | - |
| 391 | + |
392 | 392 | |
393 | 393 | |
394 | 394 | |
| ||
427 | 427 | |
428 | 428 | |
429 | 429 | |
| 430 | + |
| 431 | + |
| 432 | + |
| 433 | + |
430 | 434 | |
431 | 435 | |
432 | 436 | |
| ||
436 | 440 | |
437 | 441 | |
438 | 442 | |
439 | | - |
| 443 | + |
440 | 444 | |
441 | 445 | |
442 | 446 | |
| ||
453 | 457 | |
454 | 458 | |
455 | 459 | |
456 | | - |
| 460 | + |
457 | 461 | |
458 | 462 | |
459 | 463 | |
| ||
471 | 475 | |
472 | 476 | |
473 | 477 | |
474 | | - |
| 478 | + |
475 | 479 | |
476 | 480 | |
477 | 481 | |
|
0 commit comments