Files
Files copied to clipboard
Fix: Fixed an issue where it didn't work to open password protected zip files
Resolved / Related Issues
- [x] Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers. Closes #12105
Validation How did you test these changes?
- [x] Did you build the app and test your changes?
- [ ] Did you check for accessibility? You can use Accessibility Insights for this.
- [ ] Did you remove any strings from the en-us resource file?
- [ ] Did you search the solution to see if the string is still being used?
- [x] Did you implement any design changes to an existing feature?
- [x] CredentialDialog was modified to only show password field for zip files
- [x] Are there any other steps that were used to validate these changes?
- Tested browsing end extracting the attached archives (a rar with no password, a 7z with password "pass" and encrypted file names, a zip with password "pass"
- Tested browsing FTP drives
Screenshots (optional)
/azp run
Commenter does not have sufficient privileges for PR 12708 in repo files-community/Files
@gave92 do you think a new helper class along the lines of src/Files.App/Filesystem/StorageFileHelpers/PasswordProtectedItemHelpers.cs
could work to refactor the common methods?
Second idea would be to create a new class named PasswordProtectedBaseStorage : BaseStorageFile, IPasswordProtected
and have the methods inside. Then, make the concerned classes inherit it. BaseStorageFile
being abstract, we can also have PasswordProtectedBaseStorage
be abstract as well, hence ensuring no idea will ever be concerned by it.
Before going down the path of the second idea, we could use input from @yaira2 and @d2dyno1.
Ok this is about the best I can think of to reduce code duplication (using default interface implementations).
Would it be possible to use the new storage abstractions?
I'd rather merge it like this and then work on switching to the alternate abstractions for each storage item. It's a lot of work & testing to do everything in one swoop.
Alright, I agree 👍