Skip to content

Commit 5a258b1

Browse files
author
Devendra
committed
fix(acl): cleanup autogenerated permission files using path check
1 parent 72f4eb2 commit 5a258b1

File tree

4 files changed

+536
-2
lines changed

4 files changed

+536
-2
lines changed

FETCH_HEAD

Whitespace-only changes.

crates/tauri-utils/src/acl/build.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,15 @@ commands.deny = ["{command}"]
325325
for entry in entries.flatten() {
326326
if let Ok(file_type) = entry.file_type() {
327327
if file_type.is_file() {
328-
let file_name = entry.file_name().to_string_lossy().to_string();
329-
if !expected_files.contains(&file_name) {
328+
// relative path banate hain
329+
let relative = entry
330+
.path()
331+
.strip_prefix(&path)
332+
.unwrap()
333+
.to_string_lossy()
334+
.to_string();
335+
336+
if !expected_files.contains(&relative) {
330337
let file_path = entry.path();
331338
let _ = fs::remove_file(&file_path);
332339
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"example:api:dev": "pnpm run --filter \"api\" tauri dev"
2626
},
2727
"devDependencies": {
28+
"@changesets/cli": "^2.29.7",
2829
"prettier": "^3.6.2"
2930
},
3031
"minimumReleaseAge": 4320,

0 commit comments

Comments
 (0)