1 Commits
Author SHA1 Message Date
oxygen dioxideandaleksey-hoffman ce7aa2da45 Support password-protected ZIP archives and non-UTF-8 zip archives (#474)
* 支持解压加密压缩包和非utf8压缩包

* Fix: do not prompt for encoding when only a zip password is required

Stop marking encoding as undetermined when zip entries cannot be read
without a password, so password-only archives skip the encoding picker.

* Fix: detect zip password requirement via ZipError instead of message text

Match ZipError::PASSWORD_REQUIRED directly so archive preflight does not
depend on the zip crate's Display formatting.

* Fix: decode archive entry names with the selected encoding during extraction

Reuse the same encoding-based path decoding for progress labels so
non-UTF-8 archives show correct file names while extracting.

* Test: cover archive preflight, encoding decode, and encrypted zip extraction

Add unit tests for check_archive, Shift-JIS filename decoding, and wrong
password handling, and fix decoded path string allocation in the helper.

* Fix: abort archive extraction when preflight check fails

Show the archive error to the user and stop extraction instead of
silently continuing without password or encoding options.

* Fix: reset archive options dialog fields each time it opens

Clear the password and encoding selection when the dialog is shown so
previous archive extraction attempts do not leak into the next one.

* Fix: require a password before extracting encrypted archives

Disable the extract action in the archive options dialog until a
non-empty password is entered when the archive is encrypted.

* i18n: translate archive extraction options dialog for all locales

Localize the new archive password and encoding UI strings and related
error messages across every supported language file.

---------

Co-authored-by: aleksey-hoffman <aleksey.hoffman.public@gmail.com>
2026-06-28 22:29:21 +03:00