-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(utils): fix resources map becomes directory (#10293)
* fix(utils): fix resources map becomes directory closes #10187 Fixes the behavior of mapped resources generating extra directory, for example: `"../resources/user.json": "resources/user.json"` generates this resource `resources/user.json/user.json` where it should generate `resources/user.json` This PR includes a refactor of the Iterator implementation which splits it into more scoped functions and relis on recursing instead of a loop which makes the code a lot more readable and easier to maintain. * clippy * cover more cases * clippy * fix glob into directory, not resolving target correctly * return error when resource origin path doesn't exist * fix resources example build * Update .changes/resources-map-becoming-dirs.md --------- Co-authored-by: Lucas Nogueira <[email protected]>
- Loading branch information
1 parent
8deb196
commit 9e89193
Showing
6 changed files
with
505 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"tauri-utils": "patch:bug" | ||
--- | ||
|
||
Fix `ResourcePaths` iterator returning an unexpected result for mapped resources, for example `"../resources/user.json": "resources/user.json"` generates this resource `resources/user.json/user.json` where it should generate just `resources/user.json`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.