diff --git a/crates/fs/src/fs.rs b/crates/fs/src/fs.rs index 3acc974c98..8bedb90b1a 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 fe8104e1cd..62ce35789e 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; } };