Skip to content
Snippets Groups Projects
Unverified Commit 2b6aceda authored by GyDi's avatar GyDi
Browse files

fix: appimage path unwrap panic

parent d00fe9c5
No related branches found
No related tags found
No related merge requests found
...@@ -178,18 +178,15 @@ impl Sysopt { ...@@ -178,18 +178,15 @@ impl Sysopt {
use tauri::Manager; use tauri::Manager;
let handle = Handle::global(); let handle = Handle::global();
handle match handle.app_handle.lock().as_ref() {
.app_handle Some(app_handle) => {
.lock() let appimage = app_handle.env().appimage;
.as_ref() appimage
.map(|app_handle| {
app_handle
.env()
.appimage
.and_then(|p| p.to_str().map(|s| s.to_string())) .and_then(|p| p.to_str().map(|s| s.to_string()))
}) .unwrap_or(app_path)
.unwrap_or(Some(app_path)) }
.unwrap() None => app_path,
}
}; };
let auto = AutoLaunchBuilder::new() let auto = AutoLaunchBuilder::new()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment