Skip to content

Comments

fix(demo): correct directory rename operation in DemonstrateVFS#131

Open
phmatray wants to merge 1 commit intomainfrom
fix/directory-rename-demo
Open

fix(demo): correct directory rename operation in DemonstrateVFS#131
phmatray wants to merge 1 commit intomainfrom
fix/directory-rename-demo

Conversation

@phmatray
Copy link
Contributor

Fixes #130

Problem

The RenameDirectory demo step was commented out with a TODO because it was using the wrong method signature. The method signature is RenameDirectory(VFSDirectoryPath, string), not RenameDirectory(VFSDirectoryPath, VFSDirectoryPath).

Solution

  • Fixed the second parameter to be a string ("heroes") instead of a VFSDirectoryPath
  • Uncommented the directory rename step
  • Removed the TODO comment

Testing

✅ All 379 unit tests pass on net10.0
✅ All 71 GitHub tests pass on net10.0
✅ Build succeeds with 0 errors

Changes

// Before (commented out):
// ProcessStep(vfs, "RENAME DIRECTORY",
//     () => vfs.RenameDirectory(new VFSDirectoryPath("/avengers"), new VFSDirectoryPath("/heroes")));

// After (fixed):
ProcessStep(vfs, "RENAME DIRECTORY",
    () => vfs.RenameDirectory(new VFSDirectoryPath("/avengers"), "heroes"));

The directory rename operation now works correctly in the demo CLI.

Fixes #130

The RenameDirectory method signature takes (VFSDirectoryPath, string),
not (VFSDirectoryPath, VFSDirectoryPath). Updated the demo to use the
correct method signature.

Changes:
- Uncommented the directory rename step
- Fixed second parameter to be a string ('heroes') instead of VFSDirectoryPath
- Removed TODO comment

Tests: All 379 unit tests + 71 GitHub tests pass on net10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: directory rename operation not working correctly

1 participant