mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
backport: always check parent directory to 1.x (#11960)
Co-authored-by: griffi-gh <prasol258@gmail.com> Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app> Co-authored-by: Fabian-Lars <github@fabianlars.de> fix #8679)
This commit is contained in:
5
.changes/enhance-resource-dir-linux.md
Normal file
5
.changes/enhance-resource-dir-linux.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-utils": patch:bug
|
||||
---
|
||||
|
||||
Enhance resource directory resolution to support running on distros like NixOS.
|
||||
@@ -170,12 +170,12 @@ pub fn resource_dir(package_info: &PackageInfo, env: &Env) -> crate::Result<Path
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
res = if curr_dir.ends_with("/data/usr/bin") {
|
||||
// running from the deb bundle dir
|
||||
exe_dir
|
||||
.join(format!("../lib/{}", package_info.package_name()))
|
||||
.canonicalize()
|
||||
.map_err(Into::into)
|
||||
// (canonicalize checks for existence, so there's no need for an extra check)
|
||||
res = if let Ok(bundle_dir) = exe_dir
|
||||
.join(format!("../lib/{}", package_info.package_name()))
|
||||
.canonicalize()
|
||||
{
|
||||
Ok(bundle_dir)
|
||||
} else if let Some(appdir) = &env.appdir {
|
||||
let appdir: &std::path::Path = appdir.as_ref();
|
||||
Ok(PathBuf::from(format!(
|
||||
|
||||
Reference in New Issue
Block a user