Files
oak-gpui/crates
张小白 1f257f4704 fs: Fix copy_recursive (#25317)
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.
2025-02-24 11:02:14 +02:00
..
2025-02-19 20:33:18 +00:00
2025-01-27 13:40:59 -05:00
2025-02-24 11:02:14 +02:00
2025-02-19 21:22:31 -07:00
2025-02-14 14:04:32 -07:00