Change summary
crates/worktree/src/worktree.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Detailed changes
@@ -674,7 +674,7 @@ fn start_background_scan_tasks(
let (scan_states_tx, mut scan_states_rx) = mpsc::unbounded();
let background_scanner = cx.background_executor().spawn({
let abs_path = if cfg!(target_os = "windows") {
- abs_path.canonicalize().expect("start background scan tasks failed for canonicalize path {abs_path}")
+ abs_path.canonicalize().unwrap_or_else(|_| abs_path.to_path_buf())
} else {
abs_path.to_path_buf()
};