Skip to content
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

Bug: When a ZIP file is opened via file association, the Extract Button is not displayed on the toolbar #15457

Open
sharpninja opened this issue May 23, 2024 · 9 comments
Labels
bug Something isn't working 👀 good first issue Good issue for new contributors to get started with

Comments

@sharpninja
Copy link

Description

I have Files set as my default handler for Zip files. When I download a zip file in MS Edge and then open that zip file from Edge, Files is opened as expected, but the Extract button is not visible.

image

If Files loses focus and regains focus, the extract button will show up on the refresh.

image

Steps To Reproduce

  1. Set Files as the default handler for ZIP files
  2. Download a ZIP File in MS Edge
  3. Open the downloaded ZIP file in MS Edge
  4. Once Files opens, notice that there is no Extract button
  5. Switch focus to a different application in Windows.
  6. Switch focus back to Files, notice that the Extract button will appear.

Requirements

  • e.g. Fix crash that occurs when...
    At step 4, the Extract button should be visible.

Files Version

3.4.0.0

Windows Version

10.0.22621.3593

Log File

debug.log

@sharpninja sharpninja added the bug Something isn't working 👀 label May 23, 2024
@yaira2 yaira2 changed the title When a ZIP file is opened via file association, the Extract Button is not displayed on the toolbar. Bug: When a ZIP file is opened via file association, the Extract Button is not displayed on the toolbar May 23, 2024
@yaira2
Copy link
Member

yaira2 commented May 23, 2024

Thank you for the report

@yaira2 yaira2 added the good first issue Good issue for new contributors to get started with label May 23, 2024
@sharpninja
Copy link
Author

Just noticed an update is available, so I updated to 3.4.1.0 and problem remains.

@ashrafmansuri
Copy link
Contributor

I would like to solve this. Can I know where the AddressToolbarViewModel gets its Data from?

@0x5bfa
Copy link
Member

0x5bfa commented May 25, 2024

This button's visibility is managed by the view model of the toolbar.

image

@ashrafmansuri
Copy link
Contributor

This button's visibility is managed by the view model of the toolbar.

image

I checked and I can find it being true. But the button is still not visible.

@ashrafmansuri
Copy link
Contributor

AddressToolBarViewModel is called twice once for Home and second time for the zip file. CanExtract is true for the zip file, but I think it overrides its CanExtract with Home.

@sirwilliamthefirst
Copy link

So after some debugging, I think that once the new tab is open into a zip file, Update_ViewModel is not being called immediatly, and only waits till there is a chance (the mouse hovering over). This bug also appears when you simple right clip open a zip file. I think I can fix this, but when exactly is this function called? I was having trouble tracing the call stack

@yaira2
Copy link
Member

yaira2 commented Sep 16, 2024

It might be the selected item property.

@sirwilliamthefirst
Copy link

sirwilliamthefirst commented Sep 16, 2024

I mean I want to know what actions trigger Update_ViewModel. Basically, I don't know if there is an event handler for when the application moves from one folder into another. The stage change seems to only trigger just before we enter the folder, and not after. But I do not know how to change or check this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀 good first issue Good issue for new contributors to get started with
Projects
Status: 🔖 Ready to build
5 participants