fix(fs): prevent ENOENT on subst drive root paths like "M:\\" on Windows by mag123c · Pull Request #58989 · nodejs/node
added
c++
labels
Jul 8, 2025When using fs.readdir() or fs.readdirSync() on subst drive root paths such as M:\, Node.js was incorrectly adding a second backslash, resulting in M:\\, which caused ENOENT errors on Windows. This patch adds a safeguard to avoid appending a backslash if the path already represents a drive root, including both standard (e.g. C:\) and namespaced (e.g. \\?\C:\) formats. Fixes: nodejs#58970
github-actions
bot
added
request-ci-failed
and removed request-ci
Add this label to start a Jenkins CI on a PR.labels
Jul 22, 2025This 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