-
Notifications
You must be signed in to change notification settings - Fork 7
Fix Rename Directory Operation #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
phmatray
wants to merge
11
commits into
main
Choose a base branch
from
auto-claude/003-fix-rename-directory-operation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verified that DirectoryRenamed event invocation already correctly passes the new path parameter. Code at VFS.Rename.cs line 96 matches the VFSDirectoryRenamedArgs constructor signature perfectly. Build verification: Succeeded with 0 errors. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…aths Verified that redo logic at line 180 in ChangeHistory.cs is already correct: - Uses directoryRenamed.Path (old path where directory is after undo) - Uses directoryRenamed.NewName to rename forward - This correctly recreates the original rename operation Flow verification: 1. Original: /dir1 -> /dir2 (directory at /dir2) 2. Undo: Uses NewPath (/dir2) to rename to OldName -> directory at /dir1 3. Redo: Uses Path (/dir1) to rename to NewName -> directory back at /dir2 No code changes needed - implementation already correct. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…y nested structure Added comprehensive test RenameDirectory_handles_deeply_nested_structure() that verifies: - Creates deeply nested structure /a/b/c/d/e with files at each level - Creates subdirectories at different levels - Renames a middle directory and verifies all nested paths are updated correctly - Verifies file contents are preserved - Verifies file and directory Path properties are correctly updated - Total of 11 RenameDirectory tests now passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Verification Results: - 25 rename-specific tests: ALL PASSED - Total test results: 379 passed, 4 pre-existing failures (locale-related) - No regressions introduced by directory rename fix The 4 failures are in VFSBinaryExtensionsTests (decimal separator formatting) and are completely unrelated to the rename operation implementation. All directory rename functionality verified: ✓ Basic rename operations ✓ Nested file path updates ✓ Deeply nested structures ✓ Event args with correct paths ✓ Undo/redo operations ✓ Edge case and error handling Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…a-requested) Fixes: - Add duplicate directory check in VFS.Rename.cs before rename operation - Add test to verify exception is thrown when renaming to existing name Verified: - Validation follows same pattern as CreateDirectory duplicate check - Test matches pattern from existing duplicate validation tests - Fixes acceptance criteria #5: renaming to existing name throws exception QA Fix Session: 1 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the known issue with directory rename operations to ensure they work correctly across all scenarios including nested directories and files.