Uploaded image for project: 'Zeta Components'
  1. Zeta Components
  2. ZETACOMP-8

[Archive] Double extraction causes empty file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: Archive
    • Labels:
      None
    • Environment:
      Linux, Apache, PHP 5.2, eZ Publish 4.4 alpha6

      Description

      Using extractCurrent() to extract a single file, and then extract() to dump the whole archive, the file I extracted first is now empty (0 byte length).

      I have test code to reproduce this, and a patch that fixes it for me. If the patch is correct, the issue is that zero is incorrectly assumed equal to false.

      I see the issue only with one particular eZ Publish package file (ezpkg/tar.gz) so it could be a problem with that file as well. GNU tar/gz extracts it without problems or warnings, though. I cannot post this file publicly. I can give it to current or former eZ employees, please contact me.

        Attachments

        1. tar_v7_truncated_block.tar
          1 kB
          Patrick Allaert
        2. ZETACOMP-8.patch
          2 kB
          Patrick Allaert
        3. archive-extract-test-public.php
          0.6 kB
          Gunnstein Lye
        4. Archive_src_tar_v7.php-trunk.diff
          0.5 kB
          Gunnstein Lye

          Activity

            People

            • Assignee:
              derick Derick Rethans
              Reporter:
              gunnsteinlye Gunnstein Lye
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: