Menu

#1215 unzipping file: caution: filename not matched: Kalle Kloakk [Side 1].d64

v3.6
closed-fixed
compyx
None
2021-12-30
2020-04-21
compyx
No

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.

Discussion

  • Greg King

    Greg King - 2020-04-22

    This ticket seems like bug ticket 920.

     
  • compyx

    compyx - 2020-04-22

    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.

     
  • Greg King

    Greg King - 2020-04-22

    In the meantime, fixing "src/arch/shared/archdep_quote_parameter.c" might be a simpler solution.

    Currently, the function creates three strings: a, b, and c. To make the fix:

    • all platforms need string a;
    • nobody needs string b;
    • only Microsoft's OSes need string c.
     

    Last edit: Greg King 2020-04-22
  • compyx

    compyx - 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.

     
  • compyx

    compyx - 2020-04-22

    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?

     
  • Greg King

    Greg King - 2020-04-22

    There's a memory leak in the Windows code (string a isn't freed). This patch fixes that leak, and removes an unneeded lib_strdup(a) (string a is allocated; so, just return it).

     
  • Querino

    Querino - 2020-04-23

    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.

     
  • Querino

    Querino - 2020-07-02

    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
  • compyx

    compyx - 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.

     
  • compyx

    compyx - 2020-07-02

    Found the issue: escaping [ with \[ doesn't work to extract a file by name with info-zip's unzip, 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.

     
  • compyx

    compyx - 2020-07-02
    • status: open --> pending-fixed
    • assigned_to: compyx
    • Port: Linux -->
     
  • compyx

    compyx - 2020-07-02

    Should now be fixed for Windows and Linux. Not sure if my code fixes or breaks MacOS, so someone should probably check that :)

     
  • Querino

    Querino - 2020-07-02

    cool, in a quick test it seems to be fixed.

    thanks

     
  • compyx

    compyx - 2020-07-02

    Alright, good news, so far =)

     
  • compyx

    compyx - 2021-12-20
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB