mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:53:44 +08:00
fix: appimage path unwrap panic
This commit is contained in:
parent
bf95284b72
commit
015df9e6dd
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user