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

Archive creation does not work on windows (treats all files as links)

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: Archive
    • Labels:
      None
    • Environment:
      vista sp2 32bit, php 536 vc9

      Description

      When adding files to an archive, all of them are treated as hardlinks. The archive cannot thus be created successfully. Tested with TAR and ZIP

      The problem comes from entry.php:

      if ( ezcBaseFeatures::supportsLink() )
      {
      if ( isset( $inodes[ $struct->ino ] ) )

      { // Yes, it's a hardlink. $struct->type = ezcArchiveEntry::IS_LINK; $struct->size = 0; $struct->link = $inodes[ $struct->ino ]; }

      else

      { $inodes[ $struct->ino ] = $struct->path; }
      }

      on my pc, $struct->ino is set to 0, hence the test for a hardlink succeeds.

      Correct code:

      if ( ezcBaseFeatures::supportsLink() )
      {
      if ( isset( $inodes[ $struct->ino ] ) && $inodes[ $struct->ino ] != 0 )
      { // Yes, it's a hardlink. $struct->type = ezcArchiveEntry::IS_LINK; $struct->size = 0; $struct->link = $inodes[ $struct->ino ]; }
      else
      { $inodes[ $struct->ino ] = $struct->path; }

      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gggeek gggeek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: