Skip to content

fix: keep media ZIP exports within import limits - #430

Open
agammann wants to merge 1 commit into
DuarteSantos8:mainfrom
agammann:fix/backup-zip-import-limits
Open

agammann wants to merge 1 commit into
DuarteSantos8:mainfrom
agammann:fix/backup-zip-import-limits

Conversation

@agammann

@agammann agammann commented Oct 7, 2026

Copy link
Copy Markdown

Problem

“Export with photos & videos” could write a ZIP that “Import backup” rejects. At commit 31c6795, 1,999 distinct media files produced 2,001 ZIP entries (backup JSON, media, and README). Export reported 1,999 included files, but importing that ZIP failed with too-many.

Change

Make the ZIP writer enforce the reader’s 2,000-entry and 1 GiB entry-data limits. Exports beyond those limits now fail instead of producing a backup the app cannot restore.

Verification

  • Reproduced the 1,999-file failure against 31c6795.
  • pnpm exec vitest run src/lib/zip.test.js src/lib/backup-media.test.js — 13 passed.
  • pnpm exec vitest run — 3,163 passed across 256 files.
  • In the local guest UI, exported and reimported a ZIP with a custom exercise image; the exercise and image were restored.

This branch has not been deployed

No deployments
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.

1 participant