Index:在成员函数中对传入的path进行预处理,统一路径形式(absolute)

This commit is contained in:
mrbeanc
2023-12-20 21:28:55 +08:00
parent 02a27b4327
commit 162313b7bc
2 changed files with 21 additions and 10 deletions

View File

@@ -178,7 +178,7 @@ pub fn get_absolute_path(path: &Path) -> PathBuf {
if path.is_absolute() {
path.to_path_buf()
} else {
let abs_path = path.canonicalize().unwrap();
let abs_path = path.canonicalize().unwrap(); //这一步会统一路径分隔符
clean_win_abs_path_pre(abs_path)
}
}