Skip to content

Commit

Permalink
Merge pull request #11 from yaroslavyaroslav/root-path-fix
Browse files Browse the repository at this point in the history
root_path fix
  • Loading branch information
moven0831 authored Nov 4, 2024
2 parents 5d9611b + 51be275 commit d485291
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions mopro-msm/src/msm/utils/preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,7 @@ pub fn deserialize_input(dir: &str) -> Result<(Vec<Vec<Point>>, Vec<Vec<Scalar>>
}

pub fn get_root_path() -> String {
let current_dir = std::env::current_dir().unwrap();
let mut current_dir = current_dir;
loop {
if current_dir.ends_with("mopro-msm") {
break;
}
current_dir = current_dir.parent().unwrap().to_path_buf();
}
current_dir.display().to_string()
env!("CARGO_MANIFEST_DIR").to_string()
}

mod tests {
Expand Down

0 comments on commit d485291

Please sign in to comment.