[squeak-dev] Re: The Trunk: Compression-ar.19.mcz

Javier Díaz Reinoso javier_diaz_r at mac.com
Wed Aug 11 16:27:13 UTC 2010


On 11/08/2010, at 02:15, Andreas Raab wrote:

> On 8/10/2010 4:51 PM, Javier Díaz Reinoso wrote:
>>> On 10/08/2010, at 15:19, commits at source.squeak.org wrote:
>>> 
>>> Fix handling of empty members in ZipArchives which would produce zips considered corrupt by other tools (unzip -t).
>>> 
>>> =============== Diff against Compression-nice.18 ===============
>>> 
>>> Item was changed:
>>>  ----- Method: ZipArchiveMember>>writeDataTo: (in category 'private-writing') -----
>>>  writeDataTo: aStream
>> ...
>> 
>> This remember me of a bug who also created corrupt zip files, in ZipArchiveMember>>dosToUnixTime: for converting years the method move 1980 to 1911, so the year 2000 is moved to 1931, but February/1931 was not a leap year, is that rule of divisible by 400, so is not a very common bug.
> 
> Do you have a fix for that issue by any chance?
> 
> Cheers,
>  - Andreas
> 
Fix attached, Ned Konz was using DOS<->unix<->squeakDate conversions, instead I added squeakToDosTime: and dosToSqueakTime: to convert DOS<->squeakDate.

I tested with a file created in 29/Feb/2000 and works OK, with the previous version the error was 'Error: day is after month ends', perhaps needs some more testing.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZipDates.1.cs
Type: application/octet-stream
Size: 1631 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100811/4d2c672d/ZipDates.1.obj


More information about the Squeak-dev mailing list