You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "gggeek (JIRA)" <ji...@apache.org> on 2011/04/10 13:12:05 UTC
[jira] [Created] (ZETACOMP-71) Archive creation does not work on
windows (treats all files as links)
Archive creation does not work on windows (treats all files as links)
---------------------------------------------------------------------
Key: ZETACOMP-71
URL: https://issues.apache.org/jira/browse/ZETACOMP-71
Project: Zeta Components
Issue Type: Bug
Components: Archive
Environment: vista sp2 32bit, php 536 vc9
Reporter: gggeek
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;
}
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (ZETACOMP-71) Archive creation does not work on
windows (treats all files as links)
Posted by "gggeek (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZETACOMP-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138430#comment-13138430 ]
gggeek commented on ZETACOMP-71:
--------------------------------
switched from windows vista 32bit to windows 7 64bit: same problem still applies...
> Archive creation does not work on windows (treats all files as links)
> ---------------------------------------------------------------------
>
> Key: ZETACOMP-71
> URL: https://issues.apache.org/jira/browse/ZETACOMP-71
> Project: Zeta Components
> Issue Type: Bug
> Components: Archive
> Environment: vista sp2 32bit, php 536 vc9
> Reporter: gggeek
>
> 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;
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira