diff --git a/src-tauri/src/unzip.rs b/src-tauri/src/unzip.rs index e76c5b1..19333dd 100644 --- a/src-tauri/src/unzip.rs +++ b/src-tauri/src/unzip.rs @@ -28,6 +28,19 @@ pub fn unzip(window: tauri::Window, zipfile: String, destpath: String) { }, Err(e) => { println!("Failed to extract zip file: {}", e); + let mut res_hash = std::collections::HashMap::new(); + + res_hash.insert( + "error".to_string(), + e.to_string() + ); + + res_hash.insert( + "path".to_string(), + zipfile.to_string() + ); + + window.emit("download_error", &res_hash).unwrap(); } };