Summary: | Enable extracting of zip files with (technically invalid) windows style pathnames | ||
---|---|---|---|
Product: | [Applications] ark | Reporter: | Tony White <tonywhite100> |
Component: | general | Assignee: | Elvis Angelaccio <elvis.angelaccio> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | aliasprotect-bug, jtamate, juha.manninen, kde, nate, olivier.krief, rakuco, ustunozgur |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/ark/-/commit/2bb61221fdd0ee9a5451bd5ebbb7270a808a0226 | Version Fixed In: | 21.08 |
Description
Tony White
2008-12-01 20:18:11 UTC
Hello and thanks for the bug report. I tried to open the zip file, and the problem was immediately visible; this is a zip file that uses the "\" character for splitting folders. This is actually not allowed according to the zip file specification, so I am tempted to just say that this is an invalid zip file. I would, however, like to know how widespread this kind of zip files is. Obviously, there is some windows client that actually makes these faulty zip files. Could you tell me where to contact the person that made that zip file? If this kind of zip files actually is a common one, it might make sense to support them (although I'm not entirely sure how to do it...). Hi Harald, Yeah sure, I have a bit more info to add about this which might be useful. http://mirror05.x264.nl/Sharktooth/?dir=./MeGUI/profiles Is where they are stored. The developer's handle is Sharktooth and I don't think he has any visable blog or anything. The link comes from here : http://forum.doom9.org/showthread.php?t=101813 and I can't be sure how Sharktooth is involved in x264. I do know that he used the program MeGUI : http://mewiki.project357.com/wiki/MeGUI:Main_Page To create the archive because MeGUI has the capability to export the profiles it is used to create, Into zip archives. It's windows only too, I'm afraid. I think that the program uses a 7zip dll to export the zip files. So I guess that this problem isn't common and widespread but possible if there are libraries out there creating zip archives that don't correctly follow the specification. I think the main thing here, Whether or not you can work around this, Is having a way of preventing ark from erroring out without response and also notifying the user that they have a "Not to spec" archive on their hands. Not displaying the contents of the file would be an idea too, If ark can't extract them and you decide to go the "Archive not supported" route. Is there any reason why pzip can't be used to extract all zip archives instead of unzip if it is found on the system? Well actually, libzip - another library - is used, not unzip. The fact that both unzip and ark failed on this file is just because they both have no support for invalid files. And using 7zip as an escape route would be a very ugly solution, I would rather just fix the libzip plugin. Fixing this problem for ark is actually a quite simple thing to do - it's just a question of whether it's a good thing to do. Per the specification, '\' is just a normal character, and '/' is the folder separator. If I also accept the '\' as a folder separator, then it would work for these kind of invalid windows zip archives, but on the other hand it would break on (probably rare, but) valid archives that uses '\' as part of the filename. It's a tradeoff I'm not sure what to do with right now. *** Bug 145426 has been marked as a duplicate of this bug. *** At least IZArc is making those packages with backslash path separator. *** Bug 190515 has been marked as a duplicate of this bug. *** *** Bug 253392 has been marked as a duplicate of this bug. *** Changing the default assignee in the currently open Ark bug reports to me. *** Bug 346276 has been marked as a duplicate of this bug. *** Marking as fixed, as Ark 15.12 uses by default the 7z plugin for zip archives. p7zip has limited support for windows-style pathnames: it won't preverse the directories structure, but it will allow you to extract and recover all the files in the zip. There is not really much more that we can do. After all, specifications exist for a reason and we are talking about invalid zip archives here. Re-opening. Apparently info-zip is now able to correctly extract these kind of archives. No idea how. What we could do from the ark side is to re-load the archive forcing the info-zip plugin, if we detect the archive is using windows-style pathnames. *** Bug 400435 has been marked as a duplicate of this bug. *** Support for this has been added to the libzip plugin: https://invent.kde.org/utilities/ark/-/merge_requests/28 Marking as fixed since it's the default plugin for zip files nowadays. |