Bug 110121 - Ark doesn't handle shell critical chars in filenames
Summary: Ark doesn't handle shell critical chars in filenames
Status: RESOLVED WORKSFORME
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
: 129663 146233 147571 147922 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-03 20:38 UTC by Alexander Rigbo
Modified: 2009-04-05 04:47 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Shellquote patch for ark (3.11 KB, patch)
2005-08-03 20:40 UTC, Alexander Rigbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Rigbo 2005-08-03 20:38:39 UTC
Version:           Recent SVN (using KDE Devel)
Installed from:    Compiled sources
Compiler:          GCC 3.4.4 (ssp + pie) 
OS:                Linux

If you have a file called something like test[.txt in an archive it can't be unpacked.
Comment 1 Alexander Rigbo 2005-08-03 20:40:59 UTC
Created attachment 12070 [details]
Shellquote patch for ark

This patch fixes the problem when unpacking files.

You can do this similarly in tar.cpp, but the most recent version of tar (to
date) doesn't handle them at all.
Comment 2 Georg Robbers 2005-08-05 09:35:00 UTC
Thanks for the patch; I tried to test it, but at least for my version of unzip 
("UnZip 5.51 of 22 May 2004, by Info-ZIP") it didn't change anything.
In fact, it didn't even work from the commandline:

~> unzip -l test.zip
Archive:  test.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
    95292  08-04-05 22:42   atr[.txt
 --------                   -------
    95292                   1 file

~> unzip test.zip 'atr[.txt'
Archive:  test.zip
caution: filename not matched:  atr[.txt

so it seems it's not an Ark bug. And since the KProcesses used by Ark 
shouldn't use a shell at all, I don't see why the patch should make a 
difference - other than breaking the extraction of single files in general by 
adding quotes where there are none in the original filename...

Could you elaborate a bit more what and how you tested?
Comment 3 Alexander Rigbo 2005-08-05 11:54:04 UTC
Ah, i think i know why.. I have another version of KRun::shellQuote() then the one one SVN.
I fixed bug 109693 but it's not merged into SVN.
Try:
$ unzip test.zip atr\[.txt

/Alex
Comment 4 Tommi Tervo 2007-03-06 13:40:12 UTC
*** Bug 129663 has been marked as a duplicate of this bug. ***
Comment 5 Michal Wazgird 2007-09-04 21:30:11 UTC
This bug is still not completely fixed.
There's still impossible to extract files with square brackets by drag'n'drop or preview them.
The only way is to unpack whole archive.
Comment 6 michael mueller 2007-12-09 19:37:23 UTC
i second this, it still doesn't work. if this isn't a genuine ark bug, did someone report it to whoever is responsible for fixing this in the respective commandline tools ark uses?
Comment 7 Raphael Kubo da Costa 2009-04-02 16:13:10 UTC
*** Bug 146233 has been marked as a duplicate of this bug. ***
Comment 8 Raphael Kubo da Costa 2009-04-02 16:13:52 UTC
*** Bug 147571 has been marked as a duplicate of this bug. ***
Comment 9 Raphael Kubo da Costa 2009-04-02 16:15:46 UTC
It seems to work fine with current (KDE4) versions of Ark, both for file types which rely on external programs to extract (rar, for example) and for types which use libraries (zip). Marking as WORKSFORME.
Comment 10 Raphael Kubo da Costa 2009-04-05 04:47:55 UTC
*** Bug 147922 has been marked as a duplicate of this bug. ***