Restructure FakeFs to let it model symlinks
Instead of storing paths, model the FS more directly as nodes
This commit is contained in:
parent
0aafc78eb7
commit
f6c1393dfd
2 changed files with 528 additions and 306 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::{ProjectEntryId, RemoveOptions};
|
||||
use crate::{copy_recursive, ProjectEntryId, RemoveOptions};
|
||||
|
||||
use super::{
|
||||
fs::{self, Fs},
|
||||
|
@ -731,8 +731,13 @@ impl LocalWorktree {
|
|||
let fs = self.fs.clone();
|
||||
let abs_new_path = abs_new_path.clone();
|
||||
async move {
|
||||
fs.copy(&abs_old_path, &abs_new_path, Default::default())
|
||||
.await
|
||||
copy_recursive(
|
||||
fs.as_ref(),
|
||||
&abs_old_path,
|
||||
&abs_new_path,
|
||||
Default::default(),
|
||||
)
|
||||
.await
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue