使用路径常量

This commit is contained in:
HouXiaoxuan
2023-12-19 17:25:08 +08:00
parent 70f1d1dbc1
commit f8f785f78b
2 changed files with 2 additions and 1 deletions

1
git-rs Submodule

Submodule git-rs added at 5f3bb36574

View File

@@ -31,7 +31,7 @@ pub fn get_storage_path() -> Result<PathBuf, std::io::Error> {
let mut current_dir = std::env::current_dir()?;
loop {
let mut git_path = current_dir.clone();
git_path.push(".mit");
git_path.push(ROOT_DIR);
if git_path.exists() {
return Ok(git_path);
}