From a06dc6993148f10ff7623c9dcc81f313dd960ad0 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 29 Sep 2022 16:33:48 -0300 Subject: [PATCH] fix(core): canonicalize resource dir to fix scope check, closes #5196 (#5218) --- .changes/fix-resource-scope.md | 5 +++++ .changes/resource-dir-canonicalize.md | 5 +++++ core/tauri-utils/src/platform.rs | 10 ++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .changes/fix-resource-scope.md create mode 100644 .changes/resource-dir-canonicalize.md diff --git a/.changes/fix-resource-scope.md b/.changes/fix-resource-scope.md new file mode 100644 index 000000000..07f206885 --- /dev/null +++ b/.changes/fix-resource-scope.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Fixes resource reading being always rejected by the scope. diff --git a/.changes/resource-dir-canonicalize.md b/.changes/resource-dir-canonicalize.md new file mode 100644 index 000000000..a53f820c1 --- /dev/null +++ b/.changes/resource-dir-canonicalize.md @@ -0,0 +1,5 @@ +--- +"tauri-utils": patch +--- + +Canonicalize the return value of `platform::resource_dir`. diff --git a/core/tauri-utils/src/platform.rs b/core/tauri-utils/src/platform.rs index 6393e96e1..96614ffa2 100644 --- a/core/tauri-utils/src/platform.rs +++ b/core/tauri-utils/src/platform.rs @@ -172,7 +172,10 @@ pub fn resource_dir(package_info: &PackageInfo, env: &Env) -> crate::Result crate::Result