fix: appimage webui path
parent
3f9ce3991c
commit
d5f2d3c701
|
@ -1,3 +1,5 @@
|
|||
use std::env::current_exe;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use lazy_static::lazy_static;
|
||||
use shadow_rs::{is_debug, shadow};
|
||||
|
@ -9,7 +11,10 @@ pub fn get_resource_path<S: AsRef<str>>(dir: S) -> Result<std::path::PathBuf> {
|
|||
let cwd = std::env::current_exe()?.parent().unwrap().to_path_buf();
|
||||
cwd.join("../../tmp/resources")
|
||||
} else {
|
||||
"/usr/share/upend".into()
|
||||
current_exe()?
|
||||
.parent()
|
||||
.ok_or(anyhow!("couldn't locate resource path, binary in root"))?
|
||||
.join("../share/upend")
|
||||
};
|
||||
|
||||
let result = base_path.join(dir.as_ref());
|
||||
|
|
Loading…
Reference in New Issue