Try extraction message fix

Change version to distinguish from official release
Slightly change metadata message
This commit is contained in:
Thoronium
2023-02-25 16:53:18 -07:00
committed by GitHub
parent bf880ac297
commit 86d15cd335
3 changed files with 17 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "cultivation",
"version": "1.0.10",
"version": "1.1.11-Thorny",
"private": true,
"dependencies": {
"@tauri-apps/api": "^1.0.0-rc.5",

View File

@@ -99,29 +99,27 @@ pub fn unzip(
// Delete zip file
match std::fs::remove_file(&zipfile) {
Ok(_) => {
// Get any new directory that could have been created
let mut new_dir: String = String::new();
for entry in read_dir(&write_path).unwrap() {
let entry = entry.unwrap();
let entry_path = entry.path();
if entry_path.is_dir() && !dirs.contains(&entry_path) {
new_dir = entry_path.to_str().unwrap().to_string();
}
}
let mut res_hash = std::collections::HashMap::new();
res_hash.insert("file", zipfile.to_string());
res_hash.insert("new_folder", new_dir);
window.emit("extract_end", &res_hash).unwrap();
println!("Deleted zip file: {}", zipfile);
}
Err(e) => {
println!("Failed to delete zip file: {}", e);
}
};
// Get any new directory that could have been created
let mut new_dir: String = String::new();
for entry in read_dir(&write_path).unwrap() {
let entry = entry.unwrap();
let entry_path = entry.path();
if entry_path.is_dir() && !dirs.contains(&entry_path) {
new_dir = entry_path.to_str().unwrap().to_string();
}
}
let mut res_hash = std::collections::HashMap::new();
res_hash.insert("file", zipfile.to_string());
res_hash.insert("new_folder", new_dir);
// Testing fix
//window.emit("extract_end", &res_hash).unwrap();
});
}
@@ -151,8 +149,6 @@ fn extract_rar(rarfile: &str, _f: &File, full_path: &path::Path, _top_level: boo
fn extract_zip(_zipfile: &str, f: &File, full_path: &path::Path, top_level: bool) -> bool {
match zip_extract::extract(f, full_path, top_level) {
Ok(_) => {
// Notify extract end when extract is actually complete
window.emit("extract_end", &res_hash).unwrap();
println!(
"Extracted zip file to: {}",
full_path.to_str().unwrap_or("Error")

View File

@@ -129,7 +129,7 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
if (gameVersion?.major == 3 && gameVersion?.minor >= 1) {
alert(
'Game version is too new for metadata patching. Please disable metadata patching in the settings to launch the game.\nNOTE: You will require a UA patch to play the game.'
'Game version is too new for metadata patching. TO FIX: Please disable metadata patching in the settings menu to launch the game!! \nNOTE: You will require an RSA patch to play the game.'
)
return
}