-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #24746 This PR modifies the implementation of `copy_recursive`. Previously, we were copying and pasting simultaneously, which caused an issue when a user copied a folder into one of its subfolders. This resulted in new content being created in the folder while copying, and subsequent recursive calls to `copy_recursive` would continue this process, leading to an infinite loop. In this PR, the approach has been changed: we now first collect the paths of the files to be copied, and only then perform the copy operation. Additionally, I have added corresponding tests. On the main branch, this test would previously run indefinitely. Release Notes: - Fixed `copy_recursive` runs infinitely when copying a folder into its subfolder.
- Loading branch information
1 parent
f517050
commit 1f257f4
Showing
1 changed file
with
257 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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