Skip to content

vfs: follow symlinked dirs in recursive mkdir#64287

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-recursive-mkdir-symlink
Open

vfs: follow symlinked dirs in recursive mkdir#64287
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-recursive-mkdir-symlink

Conversation

@trivikr

@trivikr trivikr commented Jul 4, 2026

Copy link
Copy Markdown
Member

Fixes: #64286

Fix recursive mkdir in node:vfs so symlinked intermediate
directories are followed, matching native fs behavior.

The change preserves the caller-facing return value for the first
created path while creating directories in the resolved symlink target.


Assisted-by: openai:gpt-5.5

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Jul 4, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 4, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 4, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Recursive mkdir currently checks an existing intermediate entry
directly, so a symlink to a directory is treated as a non-directory
and throws ENOTDIR.

Resolve symlinked intermediate components while walking the recursive
mkdir path, creating new directories in the resolved target while
preserving the caller-facing first-created return path.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@trivikr trivikr force-pushed the vfs-recursive-mkdir-symlink branch from 0d2b3d5 to 60174cd Compare July 4, 2026 16:22
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vfs: recursive mkdir does not follow symlinked intermediate directories

3 participants