fix(utils): temp permission file names on windows (#9477)

* Replace `tauri:` with `tauri-`

* Add change file

* Apply suggestions from code review

* patch -> "patch:bug"

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
This commit is contained in:
Tony 2024-04-22 22:18:16 +08:00 committed by GitHub
parent be7eab209c
commit a1e0e268f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-utils": "patch:bug"
---
Replace `tauri:` prefix with `tauri-` for temporary permission file names

View File

@ -71,7 +71,10 @@ pub fn define_permissions<F: Fn(&Path) -> bool>(
.filter(|p| p.parent().unwrap().file_name().unwrap() != PERMISSION_SCHEMAS_FOLDER_NAME)
.collect::<Vec<PathBuf>>();
let permission_files_path = out_dir.join(format!("{}-permission-files", pkg_name));
let permission_files_path = out_dir.join(format!(
"{}-permission-files",
pkg_name.replace("tauri:", "tauri-")
));
std::fs::write(
&permission_files_path,
serde_json::to_string(&permission_files)?,