mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
parent
1d4c837abe
commit
2d532ad0ea
2 changed files with 2 additions and 2 deletions
|
@ -138,7 +138,7 @@ impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser> {
|
|||
for err in errors.into_iter() {
|
||||
let loc = err.core.get_loc_with_fallback();
|
||||
let res_uri = if let Some(path) = err.input.path() {
|
||||
Url::from_file_path(path.canonicalize().unwrap())
|
||||
Url::from_file_path(path.canonicalize().unwrap_or(path.to_path_buf()))
|
||||
} else {
|
||||
Ok(uri.clone().raw())
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ impl SharedCompilerResource {
|
|||
graph,
|
||||
cfg.input
|
||||
.path()
|
||||
.map_or(PathBuf::default(), |p| p.canonicalize().unwrap()),
|
||||
.map_or(PathBuf::default(), |p| p.canonicalize().unwrap_or_default()),
|
||||
),
|
||||
errors: SharedCompileErrors::new(),
|
||||
warns: SharedCompileWarnings::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue