mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-10-26 09:58:16 +03:00
This commit is contained in:
parent
ca3cd8b3d1
commit
a06dc69931
5
.changes/fix-resource-scope.md
Normal file
5
.changes/fix-resource-scope.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes resource reading being always rejected by the scope.
|
5
.changes/resource-dir-canonicalize.md
Normal file
5
.changes/resource-dir-canonicalize.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-utils": patch
|
||||
---
|
||||
|
||||
Canonicalize the return value of `platform::resource_dir`.
|
@ -172,7 +172,10 @@ pub fn resource_dir(package_info: &PackageInfo, env: &Env) -> crate::Result<Path
|
||||
{
|
||||
res = if curr_dir.ends_with("/data/usr/bin") {
|
||||
// running from the deb bundle dir
|
||||
Ok(exe_dir.join(format!("../lib/{}", package_info.package_name())))
|
||||
exe_dir
|
||||
.join(format!("../lib/{}", package_info.package_name()))
|
||||
.canonicalize()
|
||||
.map_err(Into::into)
|
||||
} else if let Some(appdir) = &env.appdir {
|
||||
let appdir: &std::path::Path = appdir.as_ref();
|
||||
Ok(PathBuf::from(format!(
|
||||
@ -191,7 +194,10 @@ pub fn resource_dir(package_info: &PackageInfo, env: &Env) -> crate::Result<Path
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
res = Ok(exe_dir.join("../Resources"));
|
||||
res = exe_dir
|
||||
.join("../Resources")
|
||||
.canonicalize()
|
||||
.map_err(Into::into);
|
||||
}
|
||||
|
||||
res
|
||||
|
Loading…
Reference in New Issue
Block a user