Zip plugin doesn't create a new file on MorphOS

Discuss about plugins that don't have a dedicated forum
Post Reply
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Zip plugin doesn't create a new file on MorphOS

Post by jPV »

Zip plugin's OpenArchive() doesn't create a new file if it doesn't exists already. It fails with "Error opening zip archive ram:test.zip!". Happens on MorphOS, but apparently it does work on some other platforms... haven't tested on any other now. A work-around is to create an empty file before opening it.

Code: Select all

@REQUIRE "zip"
f$ = "ram:test.zip"
StringToFile("test", f$ .. ".data")
DeleteFile(f$)

;StringToFile("", f$) ; without this the next line fails
zip.OpenArchive(1, f$, #MODE_WRITE)
zip.AddFile(1, f$ .. ".data")
zip.CloseArchive(1)
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Zip plugin doesn't create a new file on MorphOS

Post by airsoftsoftwair »

Yup, looks like a bug, will be fixed.
Post Reply