[Cuis-dev] [DEFECT] Can't zip Cuis' sources file

Juan Vuletich juan at cuis.st
Thu Nov 23 14:40:39 PST 2023


That extra field seems unnecessary. Appendix D says that it is enough 
with setting "general purpose flag 11" and filling fileName and 
fileComment with UTF8 bytes. So that's what I did.

It seems to work well. Please test.

Thanks,

On 11/23/2023 4:52 PM, Gerald Klix via Cuis-dev wrote:
> I think the ZIP file guys are well aware of that problem.
>
> In https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
> search for 4.6.9 -Info-ZIP Unicode Path Extra Field (0x7075).
>
> I don't know how much effort it is to add this extra field.
>
>
> HTH and Best Regards,
>
> Gerald
>
>
>
> On 11/23/23 8:43 PM, Gerald Klix via Cuis-dev wrote:
>> Yes, of course!
>>
>> Execute this snippet in a workspace:
>>
>> problematicName := 
>> '5922-FixedClassMethodPushDown-TomásSpognardi-2023Jul09-20h38m-TS.001.cs.st'.
>> fileEntry := DirectoryEntry smalltalkImageDirectory parent /
>>     'Cuis-Smalltalk-Dev' / 'CoreUpdates' // problematicName.
>>         .
>>
>> (z1 := ZipArchive new) zipFileComment: 'ZIP test'.
>> z1
>>     addFile: fileEntry pathName as: problematicName;
>>     writeToFileNamed: 'test.zip';
>>     close.
>>
>>
>> unzip test.zip like this:
>>
>> bear at speedy ~/s/c/Environments> unzip test.zip
>> Archive:  test.zip
>> ZIP test
>> warning [test.zip]:  1 extra byte at beginning or within zipfile
>>   (attempting to process anyway)
>> error [test.zip]:  reported length of central directory is
>>   -1 bytes too long (Atari STZip zipfile?  J.H.Holm ZIPSPLIT 1.1
>>   zipfile?).  Compensating...
>>   inflating: 
>> 5922-FixedClassMethodPushDown-TomásSpognardi-2023Jul09-20h38m-TS.001.cs.s
>>   error:  invalid compressed data to inflate
>>
>> note:  didn't find end-of-central-dir signature at end of central dir.
>>   (please check that you have transferred or created the zipfile in the
>>   appropriate BINARY mode and that you have compiled UnZip properly)
>>
>>
>> See below ...
>>
>>
>> HTH,
>>
>> Gerald
>>
>>
>>
>> On 11/23/23 8:09 PM, Juan Vuletich via Cuis-dev wrote:
>>> Hi Gerald,
>>>
>>> On 11/23/2023 3:29 PM, Gerald Klix via Cuis-dev wrote:
>>>> Hi Juan,
>>>>
>>>> I was bit hasty, zipping 
>>>> 5922-FixedClassMethodPushDown-TomásSpognardi-2023Jul09-20h38m-TS.001.cs.st
>>>> still does not work. I renamed this file and forgot to undo that 
>>>> change.
>>>
>>> Strange.
>>>
>>> I switched to Linux (Ubuntu). Pulled repo. Started a fresh Cuis. Did 
>>> `Feature require: 'Compression'.`. Then:
>>> `
>>> ZipArchive new
>>>     zipFileComment: 'ZIP file test';
>>>     addFile: 
>>> 'Cuis-Smalltalk-Dev/CoreUpdates/5922-FixedClassMethodPushDown-TomásSpognardi-2023Jul09-20h38m-TS.001.cs.st' 
>>> as: 'testOutx.bin';
>> I suppose the *filename in the archive* is the culprit.
>>> writeToFileNamed: 'testbinx.zip'.
>>> `
>>>
>>> I got a zip file that Linux can unzip without trouble.
>>>
>>> Can you please repeat _exactly_  those steps? If that works, give me 
>>> enough detail so I can reproduce it on my machine. Please include 
>>> any error messages you get along the way.
>>>
>>>> Best regards,
>>>>
>>>> Gerald
>>>>
>>>
>>> BTW, the Georgian example is just "Lorem Ipsum Dolor" :)
>>>
>>> Cheers,
>>>
>>
>>
>>
>


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20231123/4bf6e937/attachment.htm>


More information about the Cuis-dev mailing list