Restructure FakeFs to let it model symlinks

Instead of storing paths, model the FS more directly
as nodes
This commit is contained in:
Max Brunsfeld
2022-07-18 12:23:07 +02:00
committed by Antonio Scandurra
parent 0aafc78eb7
commit f6c1393dfd
2 changed files with 528 additions and 306 deletions
+8 -3
View File
@@ -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
}
});