mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
fix: permission file uses ':' in file name (#10485)
* fix: permission file uses ':' in file name * style: rustfmt
This commit is contained in:
5
.changes/fix-colon-in-file-path.md
Normal file
5
.changes/fix-colon-in-file-path.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-utils": "patch:bug"
|
||||
---
|
||||
|
||||
Fixed an issue where permission files will be generated with ':' in the file path.
|
||||
@@ -71,10 +71,8 @@ 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.replace("tauri:", "tauri-")
|
||||
));
|
||||
let permission_files_path =
|
||||
out_dir.join(format!("{}-permission-files", pkg_name.replace(':', "-")));
|
||||
std::fs::write(
|
||||
&permission_files_path,
|
||||
serde_json::to_string(&permission_files)?,
|
||||
|
||||
Reference in New Issue
Block a user