Conversation
Fixes the "Replace" option of the conflict dialog when moving one folder into another.
Contributor
There was a problem hiding this comment.
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
approved these changes
Nov 21, 2025
Contributor
tammi-23
left a comment
There was a problem hiding this comment.
👍 great, works as expected
kulmann
approved these changes
Nov 21, 2025
Member
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
openclouders
pushed a commit
that referenced
this pull request
Nov 21, 2025
fix: move folder replace
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
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.
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