@@ -232,9 +232,10 @@ pub fn dap_start_impl(
232232 if cfg.completion == Some("filename".to_owned())
233233 || cfg.completion == Some("directory".to_owned())
234234 {
235− param = std::fs::canonicalize(x).ok()
235+ param = std::fs::canonicalize(x)
236+ .ok()
236237 .and_then(|pb| pb.into_os_string().into_string().ok())
237− .unwrap_or(x.to_string());
238+ .unwrap_or_else(|| x.to_string());
238239 }
239240 }
240241 // For param #0 replace {0} in args