mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-07-04 10:16:03 +08:00
fix:去除current_head()返回值中的\n
\n会导致文件写入失败
This commit is contained in:
@@ -165,7 +165,8 @@ pub fn get_relative_path(path: &Path, dir: &Path) -> PathBuf {
|
||||
relative_path.to_path_buf()
|
||||
}
|
||||
|
||||
pub fn to_root_relative_path(path: &Path) -> PathBuf {
|
||||
/// 获取相较于工作区(Working Dir)的相对路径
|
||||
pub fn to_root_relative_path(path: &Path) -> PathBuf { //todo: rename
|
||||
get_relative_path(path, &get_working_dir().unwrap())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user