-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(windows): Handle root paths that cannot be canonicalized #10838
Conversation
Package Changes Through 7e5ef79There are 6 changes which include tauri with prerelease, tauri-runtime-wry with prerelease, tauri-runtime with prerelease, tauri-utils with prerelease, tauri-cli with prerelease, @tauri-apps/cli with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
I've added a test case for the various flavors of Windows root paths. I ran into a number of edge cases that are not currently handled well, which I documented in comments in the test case. I can open an issue for those if you would like. A few examples:
|
a652d93
to
7c56bac
Compare
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.
Thank you and apologies for the late reply
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.
Thank you. Unfortunately, you don't seem to have commit signing enabled and I can't merge the PR until
it is signed.
You need to setup commit signing, then you can sign past commit like this. git rebase --exec 'git commit --amend --no-edit -n -S' -i dev
If the root path element of a pattern could not be canonicalized, `scope::fs::push_pattern` would enter an infinite loop. This is because `path.pop()` does nothing and returns `false` when called on a path with no parent, which can happen even when the path element iterator is non-empty. This could occur on Windows, for example, with a pattern of `\\\\?\\**`. Fixes tauri-apps#10815
92bcdb9
to
7e5ef79
Compare
Sorry about that. My Windows machine doesn't have signing set up. |
I have a few changes locally while testing this PR, that simplifies the code a bit and adds more documentation. Since I can't push to your branch, I will open a follow up PR. Thanks for your help and the test cases as well. |
If the root path element of a pattern could not be canonicalized,
scope::fs::push_pattern
would enter an infinite loop. This is becausepath.pop()
does nothing and returnsfalse
when called on a path with no parent, which can happen even when the path element iterator is non-empty. This could occur on Windows, for example, with a pattern of\\?\**
.Fixes #10815