-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[persisted scope] fix: handle recursive directory correctly #455
Conversation
First of all, thanks for rewriting it for the x-th time 😅 I really like this one's approach! As far as i can see, it's working nicely for recursive dirs, but "normal" dirs are missing the removal of the trailing Also, since this is one of the very few plugins released to crates.io we will also need a changefile before we can merge it. (TIL that we use glob patterns for saving dirs at runtime too, i thought we only do that for tauri.conf.json scopes...) |
I'll look at it this evening, thanks for taking the time to check on it. Might have been hyperfocused on the "**" 😅 Thanks for the reminder about the change file |
Ok, that is one more step in the good direction.
Should be fixed now. Edit: Another point, what if we had a file/path with Test: So, do we need to escape it in some way ? |
i don't think so. This pattern will only be used in tauri.conf.json which already allows/denys the paths itself so i don't think this plugin should be concerned about
I personally don't think this would be a real world issue. But even if, we can only handle that by removing/rewriting the current pattern fixer. So something we can keep in mind if we change the file version or something but i'd rather not remove the fix without some other kind of safeguard (like not reading the old file at all) since the fix was added to prevent OOM crashes (which weren't rare). |
Yeah... That's what I realised this morning...
|
I think it is done 😶 |
Looks awesome! gonna do some last testing tomorrow morning and will merge it asap then :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
Co-authored-by: Fabian-Lars <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: FabianLars <[email protected]> Co-authored-by: FabianLars <[email protected]> Co-authored-by: Alexandre Dang <[email protected]> Co-authored-by: Ludea <[email protected]> Co-authored-by: Amr Bashir <[email protected]> Co-authored-by: Duke Jones <[email protected]> Co-authored-by: NaokiM03 <[email protected]> Co-authored-by: Thibault <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: David Blythe <[email protected]> Co-authored-by: Lucas Nogueira <[email protected]> fix(stronghold): change wrong argument name for `remove` (#422) fix(window-state): correctly set decoration state if no saved state exists, fixes #421 (#424) fix(stronghold): return null if there is no record (#129) fix(window-state): propagate promise (#435) closes #432 fix(window-state): manual default implentation (#425) fix(window-state): manual default implentation, closes #421 fix(deps): update rust crate iota-crypto to 0.21 (#438) fix readme example (#447) fix: handle recursive directory correctly (#455) fix(deps): update rust crate sqlx to 0.7. plugin-sql msrv is now 1.65 (#464) fix(persisted-scope): separately save asset protocol patterns (#459) fix(deps): update rust crate iota-crypto to 0.22 (#475) fix(deps): update tauri monorepo to v1.4.0 (#482) resolve to v15.1.0 (#489) fix(deps): update rust crate iota-crypto to 0.23 (#495)
This got releases in v1 and v2? |
yes |
Apparently, I must have broken something while wanting to change #32 to not use change the data structure nor a git version of Tauri.
But here we are.
PR for fixing #25 by calling the calling specific function for file/directory and handling recursion.
We can't just directly pass saved paths/patterns as recursive one such as "/my/path/**" as they will be escaped to "/my/path/[*][*]" when allowed in the scope.
We need to check on them if they are files/directories/recursive directories versions of the pattern and then edit them if necessary.