@@ -145,7 +145,8 @@ impl ui::menu::Item for PickerDiagnostic {
145 let path = match format {
145 let path = match format {
146 DiagnosticsFormat::HideSourcePath => String::new(),
146 DiagnosticsFormat::HideSourcePath => String::new(),
147 DiagnosticsFormat::ShowSourcePath => {
147 DiagnosticsFormat::ShowSourcePath => {
148− let path = path::get_truncated_path(self.url.path());
148+ let file_path = self.url.to_file_path().unwrap();
149+ let path = path::get_truncated_path(file_path);
149 format!("{}: ", path.to_string_lossy())
150 format!("{}: ", path.to_string_lossy())