mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
windows: Fix crash when saving files to disk (#11547)
closes #11544, sorry for introduce this issue by pre pr. Release Notes: - N/A
This commit is contained in:
parent
4b98c35d68
commit
ec3aabe2c2
@ -674,7 +674,7 @@ fn start_background_scan_tasks(
|
|||||||
let (scan_states_tx, mut scan_states_rx) = mpsc::unbounded();
|
let (scan_states_tx, mut scan_states_rx) = mpsc::unbounded();
|
||||||
let background_scanner = cx.background_executor().spawn({
|
let background_scanner = cx.background_executor().spawn({
|
||||||
let abs_path = if cfg!(target_os = "windows") {
|
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 {
|
} else {
|
||||||
abs_path.to_path_buf()
|
abs_path.to_path_buf()
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user