mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-27 19:59:07 +00:00
fix: path-related bugs
This commit is contained in:
parent
e7f1f6894d
commit
50c476b66f
7 changed files with 175 additions and 31 deletions
|
@ -2,6 +2,7 @@ use std::mem;
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
use erg_common::config::{ErgConfig, Input};
|
||||
use erg_common::pathutil::squash;
|
||||
use erg_common::python_util::BUILTIN_PYTHON_MODS;
|
||||
use erg_common::traits::Locational;
|
||||
use erg_common::Str;
|
||||
|
@ -383,6 +384,7 @@ impl<'a> Linker<'a> {
|
|||
&mod_name_str
|
||||
};
|
||||
dir.push(mod_name_str);
|
||||
let dir = squash(dir);
|
||||
let mut comps = dir.components();
|
||||
let _first = comps.next().unwrap();
|
||||
let path = dir.to_string_lossy().replace(['/', '\\'], ".");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue