Repository navigation
Commit ce98a72
fs: handle extended Windows path prefix in realpathSync and realpath
Strip the \\?\ extended-length path prefix from Windows paths in
fs.realpathSync and fs.realpath before the path walking logic.
The \\?\ prefix is a Win32 API mechanism to bypass MAX_PATH limits.
When a user passes a path like \\?\C:\path\to\file.js, Node.js should
handle it transparently by converting to the standard C:\path\to\file.js
form for internal processing. The \\?\ prefix is re-added as needed via
path.toNamespacedPath() before actual system calls.
Handles two forms of extended paths:
- \\?\C:\path -> C:\path (extended drive path)
- \\?\UNC\server\share -> \\server\share (extended UNC path)
Fixes: nodejs#62446
Agent-Logs-Url: https://github.com/jazelly/node/sessions/77c338e9-ef46-46f1-8800-b6ad9a74ab36
Co-authored-by: jazelly <[email protected]>1 parent 53bcd11 commit ce98a72
2 files changed
Lines changed: 115 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2628 | 2628 | | |
2629 | 2629 | | |
2630 | 2630 | | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
2631 | 2668 | | |
2632 | 2669 | | |
2633 | 2670 | | |
| |||
2690 | 2727 | | |
2691 | 2728 | | |
2692 | 2729 | | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
2693 | 2736 | | |
2694 | 2737 | | |
2695 | 2738 | | |
| |||
2793 | 2836 | | |
2794 | 2837 | | |
2795 | 2838 | | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
2796 | 2844 | | |
2797 | 2845 | | |
2798 | 2846 | | |
| |||
2851 | 2899 | | |
2852 | 2900 | | |
2853 | 2901 | | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
2854 | 2908 | | |
2855 | 2909 | | |
2856 | 2910 | | |
| |||
2951 | 3005 | | |
2952 | 3006 | | |
2953 | 3007 | | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
2954 | 3014 | | |
2955 | 3015 | | |
2956 | 3016 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments