-
Notifications
You must be signed in to change notification settings - Fork 25
fix: move folder replace #1627
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
fix: move folder replace #1627
Conversation
Fixes the "Replace" option of the conflict dialog when moving one folder into another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the "Replace" option in the conflict dialog when moving folders. The fix addresses an issue where moving a folder into another folder would incorrectly detect a naming clash with a parent folder.
Key Changes:
- Added path validation logic to prevent false positive parent folder overwrite detection
- Updated test to be synchronous and properly mock the current folder resource
- Added edge case handling for upward folder moves in the hierarchy
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/web-pkg/src/helpers/resource/conflictHandling/transfer.ts | Added null check for current folder path and logic to handle edge case where folders are moved upward in hierarchy |
| packages/web-pkg/tests/unit/helpers/resource/conflictHandling/resourcesTransfer.spec.ts | Updated test to be synchronous, added path property to mocked resource, and removed async/await from function calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tammi-23
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 great, works as expected
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
fix: move folder replace
Fixes the "Replace" option of the conflict dialog when moving one folder into another.
The issue was the edge case check if a user moves a subfolder with the same name as the current folder into the parent of the current folder. I just added another check to ensure this only happens when moving a folder up in the hierarchy.
fixes #1617