Skip to content

vfs: follow symlinked dirs in recursive mkdir#64287

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:vfs-recursive-mkdir-symlink
Jul 7, 2026
Merged

vfs: follow symlinked dirs in recursive mkdir#64287
nodejs-github-bot merged 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

This comment was marked as outdated.

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
@trivikr trivikr requested a review from mcollina July 4, 2026 19:38
@trivikr

trivikr commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

cc @jasnell @mcollina can one you provide your approval?
The CI failed before rebase, and the new CI can't start till there's another approval.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Jul 6, 2026
@joharikapil31-ops

This comment was marked as low quality.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 6, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr trivikr added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 7, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 7, 2026
@nodejs-github-bot nodejs-github-bot merged commit d3be8ab into nodejs:main Jul 7, 2026
74 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in d3be8ab

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. 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

5 participants