-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix: Fixed issue where archives opened in new tab instead of existing one #17394
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
base: main
Are you sure you want to change the base?
Fix: Fixed issue where archives opened in new tab instead of existing one #17394
Conversation
Works for me |
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.
Pull Request Overview
This PR fixes a bug where ZIP archives would open in a new tab instead of the existing tab when multiple applications were registered for the .zip
file extension. The issue occurred because only the first file association was checked, which might not be the Files app itself.
- Refactored file association checking to examine all registered associations instead of just the first one
- Added new method
GetAllFileAssociationsAsync
to retrieve all file associations for a given file type - Updated the ZIP folder logic to use
Any()
check across all associations to determine if Files app can handle the file
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ZipStorageFolder.cs | Updated CheckDefaultZipApp to use new method that checks all file associations instead of just the first one |
Win32Helper.Storage.cs | Added GetAllFileAssociationsAsync method and refactored existing association logic into reusable helper methods |
2109996
to
11b054b
Compare
If I change the default association to File Explorer, it still opens in Files. The expected behavior is to respect the default association. |
The current implementation |
Resolved / Related Issues
Steps used to test these changes
Description
On my system, multiple applications were returned for the .zip file extension. The first association returned was not Files, which caused .zip files to open in a new tab instead of the same one.
With this change, all associations are now checked