diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-05-10 02:52:39 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-05-10 02:52:39 +0200 |
commit | 2e11374529573edd5f67da83082998884fa63b5a (patch) | |
tree | f959770b43f4d075180c072b7243e0b5bec8fe46 /src-tauri/src/lib.rs | |
parent | 11bd3a3a4f87bedd216bba9b6cb148659d42cf8d (diff) | |
download | FlightCore-2e11374529573edd5f67da83082998884fa63b5a.tar.gz FlightCore-2e11374529573edd5f67da83082998884fa63b5a.zip |
refactor: Move `check_mod_version_number`
to northstar module
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r-- | src-tauri/src/lib.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index e22801c5..5e187edf 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -64,22 +64,6 @@ struct InstallProgress { state: InstallState, } -/// Check version number of a mod -pub fn check_mod_version_number(path_to_mod_folder: &str) -> Result<String, anyhow::Error> { - // println!("{}", format!("{}/mod.json", path_to_mod_folder)); - let data = std::fs::read_to_string(format!("{path_to_mod_folder}/mod.json"))?; - let parsed_json: serde_json::Value = serde_json::from_str(&data)?; - // println!("{}", parsed_json); - let mod_version_number = match parsed_json.get("Version").and_then(|value| value.as_str()) { - Some(version_number) => version_number, - None => return Err(anyhow!("No version number found")), - }; - - log::info!("{}", mod_version_number); - - Ok(mod_version_number.to_string()) -} - // I intend to add more linux related stuff to check here, so making a func // for now tho it only checks `ldd --version` // - salmon |