From d22a576f5e05f0a3b1a83e67b40489f9068c4e74 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Thu, 29 Jun 2023 23:50:24 -0700 Subject: [PATCH] fix failing test --- crates/project/src/worktree.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index 2b166bf6ef..7596b0fcb7 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -1016,13 +1016,14 @@ impl LocalWorktree { cx.spawn(|this, mut cx| async move { write.await?; let (result, refreshes) = this.update(&mut cx, |this, cx| { - let mut refreshes = Vec::new(); + let mut refreshes = Vec::>>::new(); let refresh_paths = path.strip_prefix(&lowest_ancestor).unwrap(); for refresh_path in refresh_paths.ancestors() { - let refresh_full_path = lowest_ancestor.join(refresh_path); - if refresh_full_path.as_path() == path.deref() { + if refresh_path == Path::new("") { continue; } + let refresh_full_path = lowest_ancestor.join(refresh_path); + refreshes.push(this.as_local_mut().unwrap().refresh_entry( refresh_full_path.into(), None,