mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
Add download menu translations
Update download menu formatting Better error logging
This commit is contained in:
@@ -131,8 +131,8 @@ pub fn read_file(path: String) -> String {
|
||||
let mut file = match fs::File::open(path_buf) {
|
||||
Ok(file) => file,
|
||||
Err(e) => {
|
||||
println!("Failed to open file: {}", e);
|
||||
return String::new();
|
||||
// Send back error for handling by the caller
|
||||
return e;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -96,6 +96,13 @@ pub fn unzip(
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
// If downloading full build, emit that the jar was extracted with it
|
||||
if zipfile = "GrasscutterCulti3.4.zip" {
|
||||
window
|
||||
.emit("jar_extracted", destpath.to_string() + (destpath.to_string() + "grasscutter.jar"))
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
// Delete zip file
|
||||
match std::fs::remove_file(&zipfile) {
|
||||
Ok(_) => {
|
||||
|
||||
Reference in New Issue
Block a user