Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • K KArchive
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FrameworksFrameworks
  • KArchive
  • Merge requests
  • !34

Rewrite KZip file parsing

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Albert Astals Cid requested to merge work/aacid/450597 into master Mar 23, 2022
  • Overview 4
  • Commits 1
  • Pipelines 3
  • Changes 2

The old file parser was reading the file in order looking for the local header and central directory header markers, but that breaks when those markers are part of the data of the files inside the zip file itself.

The correct way is to scan for the end of central directory record signature and then from there use the offsets to jump to the rest of the data.

BUGS: 450597

TODO:

  • Doesn't work on sequential IO devices, do we care?
  • The two test files introduced because of https://marc.info/?l=kde-frameworks-devel&m=142402457702039&w=2 fail, the end of central directory record has a broken offset, do we care? Ark (using libarchive?) can't open them either
  • Add an autotest with the files that didn't use to work and now work
Edited Mar 23, 2022 by Albert Astals Cid
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/aacid/450597