diff --git a/crates/fs/src/fs.rs b/crates/fs/src/fs.rs index 3acc974c989c5308d4d181cf067790fc74a40535..8bedb90b1a12237c002ba33d7e3a3845e834d933 100644 --- a/crates/fs/src/fs.rs +++ b/crates/fs/src/fs.rs @@ -597,7 +597,9 @@ impl Fs for RealFs { } async fn canonicalize(&self, path: &Path) -> Result { - Ok(smol::fs::canonicalize(path).await?) + Ok(smol::fs::canonicalize(path) + .await + .with_context(|| format!("canonicalizing {path:?}"))?) } async fn is_file(&self, path: &Path) -> bool { diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rs index fe8104e1cdb297386a37c42103cbeb5c61272610..62ce35789e4a96f7f188d1fc6f9d42ede0f57f93 100644 --- a/crates/worktree/src/worktree.rs +++ b/crates/worktree/src/worktree.rs @@ -3948,7 +3948,7 @@ impl BackgroundScanner { let root_canonical_path = match self.fs.canonicalize(root_path.as_path()).await { Ok(path) => SanitizedPath::from(path), Err(err) => { - log::error!("failed to canonicalize root path: {}", err); + log::error!("failed to canonicalize root path {root_path:?}: {err}"); return true; } };