FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fs: fix realpath of namespaced drive paths by jazelly · Pull Request #65378 · nodejs/node · GitHub

/ node Public

fs: fix realpath of namespaced drive paths - #65378

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
jazelly:fix-62446-1
Aug 24, 2026
Merged

fs: fix realpath of namespaced drive paths#65378
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
jazelly:fix-62446-1

Conversation

jazelly commented Aug 18, 2026
edited
Loading

Copy link
Copy Markdown
Member

The JavaScript realpath implementation probes a namespaced drive root through the fs binding. Windows path resolution drops the trailing separator from that probe, so lstat receives C: and reports EISDIR.

Use the regular drive-root spelling only for the probe. Preserve the namespaced spelling for traversal and returned paths.

Fixes: #62446


AI Disclaimer: I used AI to help me evaluate approaches. My initial attempt at #62639 was too breaking.

nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Aug 18, 2026
jazelly marked this pull request as ready for review August 18, 2026 12:25
jazelly added the windows Issues and PRs related to the Windows platform. label Aug 18, 2026

codecov Bot commented Aug 18, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (cf30b2e) to head (230ce75).
⚠️ Report is 119 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #65378    +/-   ##
========================================
  Coverage   90.11%   90.12%            
========================================
  Files         752      752            
  Lines      251861   252212   +351     
  Branches    47365    47446    +81     
========================================
+ Hits       226955   227296   +341     
+ Misses      16238    16213    -25     
- Partials     8668     8703    +35     
Files with missing lines Coverage Δ
lib/fs.js 98.42% <100.00%> (+0.05%) ⬆️

... and 51 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The JavaScript realpath implementation probes a namespaced drive root
through the fs binding. Windows path resolution drops the trailing
separator from that probe, so lstat receives C: and reports EISDIR.

Use the regular drive-root spelling only for the probe. Preserve the
namespaced spelling for traversal and returned paths.

Signed-off-by: Jason Zhang <xzha4350@gmail.com>

jazelly commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

cc @nodejs/fs

jazelly added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2026

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

jazelly added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. and removed needs-ci PRs that need a full CI run. labels Aug 24, 2026
nodejs-github-bot merged commit 2dbf9d7 into nodejs:main Aug 24, 2026
74 checks passed

Copy link
Copy Markdown
Collaborator

Landed in 2dbf9d7

nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 24, 2026
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
The JavaScript realpath implementation probes a namespaced drive root
through the fs binding. Windows path resolution drops the trailing
separator from that probe, so lstat receives C: and reports EISDIR.

Use the regular drive-root spelling only for the probe. Preserve the
namespaced spelling for traversal and returned paths.

Signed-off-by: Jason Zhang <xzha4350@gmail.com>
PR-URL: #65378
Fixes: #62446
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
The JavaScript realpath implementation probes a namespaced drive root
through the fs binding. Windows path resolution drops the trailing
separator from that probe, so lstat receives C: and reports EISDIR.

Use the regular drive-root spelling only for the probe. Preserve the
namespaced spelling for traversal and returned paths.

Signed-off-by: Jason Zhang <xzha4350@gmail.com>
PR-URL: #65378
Fixes: #62446
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node cannot handle extended windows paths

4 participants


Back | FazBrowse Home | New Git URL