Skip to content

fix(archives): clarify invalid and damaged archive errors - #638

Merged
l0gicgate merged 7 commits into
lgse:mainfrom
kallupx:fix/434-invalid-archive-errors
Sep 9, 2026
Merged

l0gicgate merged 7 commits into
lgse:mainfrom
kallupx:fix/434-invalid-archive-errors

Conversation

@kallupx

@kallupx kallupx commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Extracting a text file renamed to .zip, malformed TAR/gzip input, or a truncated archive can show raw decoder diagnostics such as “Could not find EOCD”. Translate recognized malformed headers, truncated streams, and checksum failures to: “This file is not a valid archive or is damaged.”

The existing operation error dialog and password flow are retained. Input-read translation leaves destination writes, unsafe-path checks, cancellation, compression, and extraction policy unchanged. Unknown errors retain their diagnostics.

The marquee-scrolling E2E scenario now reads live collection rows directly. Its previous full-window scans could take several seconds, leaving only recycled, offscreen rows to inspect and causing false timeouts in all three views. The drag, selection assertions, and timeout are unchanged.

Visual evidence

Before: raw decoder diagnostics. After: “This file is not a valid archive or is damaged.”

Fixture Before After
fake.zip fake.zip — before fake.zip — after
fake.7z fake.7z — before fake.7z — after
invalid.tar invalid.tar — before invalid.tar — after
invalid.tar.gz invalid.tar.gz — before invalid.tar.gz — after
truncated.zip truncated.zip — before truncated.zip — after
truncated.tar truncated.tar — before truncated.tar — after
truncated.tar.gz truncated.tar.gz — before truncated.tar.gz — after

Full evidence and reproduction details, including fixture checksums, accessibility trees, and capture environment records. Composited context menus: before · after.

Both phases use the same fixtures, GTK 4.22.4, azure-glow theme, scale 1, and 1200×760 window on a private Xvfb display with xcompmgr. These are unedited application-window captures with popup transparency correctly composited.

How to test

  1. In a disposable folder, save harmless text as fake.zip, fake.7z, invalid.tar, and invalid.tar.gz. Also make copies of small valid archives and truncate their headers. Use Extract here on each, and close the error dialog.
  2. Extract valid ZIP, 7z, TAR, and TAR.GZ archives using Extract here and Extract to…. Confirm their contents and existing files in the destination are preserved, with conflicts renamed as before.
  3. Extract password-protected ZIP and 7z files. Confirm the password prompt appears, try a wrong password, then start extraction again with the correct password.
  4. Check a missing/unreadable source, an unwritable or invalid destination, an unsafe member path, and cancellation during extraction. These should retain their specific errors or cancellation behavior. A corrupt member should be removed while completed members and pre-existing files remain.

Expected result: Recognized invalid or damaged archives show the clear message in the existing dialog, and progress stops. A subsequent valid extraction works. Password, filesystem, safety, unsupported-format, and cancellation failures remain distinct.

Related issue

Closes #434

Translate recognized decoder failures while preserving password retries,
filesystem errors, unsafe-path protection, and cancellation behavior.

Refs lgse#434
Avoid scanning the full accessibility tree while GTK recycles moving rows. Preserve the pointer interactions, selection assertions, and timeout.
@kallupx
kallupx marked this pull request as ready for review September 8, 2026 20:42
@l0gicgate

Copy link
Copy Markdown
Contributor

Merged current main and resolved archive-decoder/test conflicts while preserving extraction size checks and friendly invalid-archive errors. Fixed the marquee E2E test to read live viewport bounds, retained main’s decoder coverage and MIT metadata, and removed redundant comments. Final diff/comment audit completed.

The isolated GUI E2E suite exercised invalid ZIP/7z/TAR/gzip error dialogs and successful extraction afterward. No additional manual GUI session or new media was captured; review fixes do not change the intended visual design. Existing PR screenshots remain the visual evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(archives): show clearer errors for invalid archive files

2 participants