Zip plugin doesn't create a new file on MorphOS
Posted: Wed Oct 15, 2025 3:01 pm
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)