Skip to content

vfs: reject rename into descendant directory#64285

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-memory-provider-rename
Open

vfs: reject rename into descendant directory#64285
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-memory-provider-rename

Conversation

@trivikr

@trivikr trivikr commented Jul 4, 2026

Copy link
Copy Markdown
Member

Fixes: #64284

Fixes MemoryProvider.renameSync() so renaming a directory into its own
descendant throws EINVAL instead of detaching the subtree.


Assisted-by: openai:gpt-5.5

MemoryProvider allowed renaming a directory into its own descendant,
which detached the subtree from the root. Reject this case with EINVAL
before mutating the tree.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
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

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: MemoryProvider allows renaming a directory into its own descendant

3 participants