When trying to autostart x64sc with https://csdb.dk/release/download.php?id=33232 VICE appears to try to unzip the file and start the first entry (as it should), but it fails:
AUTOSTART: Autodetecting image type of `Kalle Kloakk.zip'.
caution: filename not matched: Kalle Kloakk [Side 1].d64
Filesystem Image Probe: Error - Import GCR: Unknown GCR image version 8.
Filesystem Image: Unknown disk image `Kalle Kloakk.zip'.
caution: filename not matched: Kalle Kloakk [Side 1].d64
caution: filename not matched: Kalle Kloakk [Side 1].d64
Tape: Error - Cannot open file `Kalle Kloakk.zip'
caution: filename not matched: Kalle Kloakk [Side 1].d64
Error - CRT header invalid.
CART: '/home/compyx/projects/csdb-leech/temp/Kalle Kloakk.zip' is not a valid CRT file.
AUTOSTART: Loading PRG file `Kalle Kloakk.zip' with autostart disk image.
AUTOSTART: Error - Invalid size of 'Kalle Kloakk.zip': 185726
AUTOSTART: Error - `Kalle Kloakk.zip' is not a valid file.
I can't find the "caution:" messages in VICE, so I suspect this is ouput by whatever VICE calls to unzip said file. When I unzip the file and start the unzipped files, including the '[' and ']' tokens, all is well.
This ticket seems like bug ticket 920.
Yes, there it is, couldn't find that report. That is indeed the same issue. I'll see what tool is used by VICE to unzip on my box, maybe there's a command line switch to ignore globbing.
Blacky Stardust had the idea to use libarchive to handle archives, so I'll look into that, sound like a good plan, and would allow also writing back to archives.
In the meantime, fixing "src/arch/shared/archdep_quote_parameter.c" might be a simpler solution.
Currently, the function creates three strings:
a,b, andc. To make the fix:a;b;c.Last edit: Greg King 2020-04-22
Alright, will have a look. I only have Linux at the moment and don't feel like installing a Windows VM, So any Windows testing should be done by someone else.
Should be fixed in commit https://sourceforge.net/p/vice-emu/code/37677/.
Only tested this on Linux, so perhaps Windows, MacOS or *BSD users could check this as well?
There's a memory leak in the Windows code (string
aisn't freed). This patch fixes that leak, and removes an unneededlib_strdup(a)(stringais allocated; so, just return it).under windows, it's still not working.
right square brackets works now, but if there is a left square bracket in the file name, it still fails.
this is still a issue, at least under windows.
sadly, a lot of the zip files in the
C64_Preservation_Project_10th_Anniversary_Collection
contain left square brackets. :(
unzip itself can easily unpack such files.
btw, the SDL version has the same problem.
Last edit: Querino 2020-07-02
I had hoped to fix this properly when implementing libarchive support, but since that might take a while, I'll have another look at this.
Found the issue: escaping
[with\[doesn't work to extract a file by name with info-zip'sunzip, since[denotes a wildcard and should be escaped with[[]. So I guess I'll need to hack src/zfile.c to do this special escaping when using info-zip's unzip.Sigh.
Should now be fixed for Windows and Linux. Not sure if my code fixes or breaks MacOS, so someone should probably check that :)
cool, in a quick test it seems to be fixed.
thanks
Alright, good news, so far =)