PHP Classes

bug

Recommend this page to a friend!

      TAR/GZIP/BZIP2/ZIP Archives  >  All threads  >  bug  >  (Un) Subscribe thread alerts  
Subject:bug
Summary:there is a bug on line 650
Messages:2
Author:smate smate
Date:2007-04-17 14:07:27
Update:2009-01-25 18:33:14
 

  1. bug   Reply   Report abuse  
Picture of smate smate smate smate - 2007-04-17 14:07:27
line 650 in archive.php will look like this to work ok

if(!is_dir($current['name'])) { //smate.sk && faster.sk from webdream.sk
$central .= pack("VvvvvVVVVvvvvvVV", 0x02014b50, 0x0014, $this->options['method'] == 0 ? 0x0000 : 0x000A, 0x0000,
(isset($current['method']) || $this->options['method'] == 0) ? 0x0000 : 0x0008, $timedate,
$crc32, $size, $current['stat'][7], strlen($current['name2']), 0x0000, 0x0000, 0x0000, 0x0000, 0x00000000, $offset);
$central .= $current['name2'];

  2. Re: bug   Reply   Report abuse  
Picture of Amy Amy - 2009-01-25 18:33:14 - In reply to message 1 from smate smate
Just to make it clear, this bug fixes the following problem. Creating archives on Windows everything seems to work ok, but on a *nix linux server, directories turn up as files in the archive and corrupt.

Remember to add the closing parenthesis.


if(!is_dir($current['name'])) {
$central .= pack("VvvvvVVVVvvvvvVV", 0x02014b50, 0x0014, $this->options['method'] == 0 ? 0x0000 : 0x000A, 0x0000,
(isset($current['method']) || $this->options['method'] == 0) ? 0x0000 : 0x0008, $timedate,
$crc32, $size, $current['stat'][7], strlen($current['name2']), 0x0000, 0x0000, 0x0000, 0x0000, 0x00000000, $offset);
$central .= $current['name2'];
}