Skip to content

vfs: MemoryProvider allows renaming a directory into its own descendant #64284

Closed

Description

@trivikr

Version

main

Platform

macOS 26.5.0

Subsystem

vfs

What steps will reproduce the bug?

import vfs from 'node:vfs';

const fs = vfs.create({ emitExperimentalWarning: false });

fs.mkdirSync('/a/b', { recursive: true });
fs.writeFileSync('/a/file.txt', 'data');

try {
  fs.renameSync('/a', '/a/b/c');
  console.log('rename succeeded');
} catch