Uh oh!
There was an error while loading. Please reload this page.
Commit e640dc9
authored
win: handle short path mismatch with a fallback in fs events (#5152)
uv_fs_event_start() stores the watched directory path verbatim in
handle->dirw. When an event arrives, the child path is resolved to its
long form with GetLongPathNameW() and uv__relative_path() strips the
handle->dirw prefix off the result.
Previously if the directory was supplied as an 8.3 short path, the
long form no longer shares that prefix, so the prefix check in
uv__relative_path() fails, which either fires an assertion in
builds without NDEBUG or produces a wrong(potentially
out-of-bounds) result otherwise.
This patch falls back to the name reported by ReadDirectoryChangesW
in this case, since that is already relative to the watched directory,
similar to how other branches handle it.
Also update the test to try testing under %TEMP% if accessible to
increase the chance of it reproducing in the CI.1 parent f6b7133 commit e640dc9
2 files changed
Lines changed: 116 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| |||
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| |||
522 | 527 | | |
523 | 528 | | |
524 | 529 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
531 | 545 | | |
532 | 546 | | |
533 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
635 | 693 | | |
636 | 694 | | |
637 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
638 | 700 | | |
639 | 701 | | |
640 | 702 | | |
641 | | - | |
642 | 703 | | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | 704 | | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
653 | 722 | | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
654 | 729 | | |
655 | 730 | | |
656 | | - | |
| 731 | + | |
657 | 732 | | |
658 | 733 | | |
659 | 734 | | |
660 | | - | |
| 735 | + | |
661 | 736 | | |
662 | 737 | | |
663 | 738 | | |
664 | 739 | | |
665 | 740 | | |
666 | 741 | | |
667 | 742 | | |
668 | | - | |
669 | 743 | | |
670 | | - | |
671 | | - | |
672 | | - | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
673 | 748 | | |
674 | 749 | | |
675 | 750 | | |
| |||
0 commit comments