Bug 266159 - libarchive: Ark does not extract selected files when they are renamed
Summary: libarchive: Ark does not extract selected files when they are renamed
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-12 19:56 UTC by Christopher Yeleighton
Modified: 2011-02-14 01:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.6.1


Attachments
A small archive with one short text file in it. (99 bytes, application/octet-stream)
2011-02-12 19:56 UTC, Christopher Yeleighton
Details
maybe this time (196 bytes, application/x-gzip)
2011-02-13 19:30 UTC, Christopher Yeleighton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Yeleighton 2011-02-12 19:56:53 UTC
Created attachment 57193 [details]
A small archive with one short text file in it.

Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

When Ark encounters an existing file during extraction, it asks the operator whether it should rename it.  When told to rename it, Ark fails to extract.

Reproducible: Always

Steps to Reproduce:
  1. Tell Ark to open the attached archive.
  2. Tell Ark to extract the file.
  3. Tell Ark to extract the file.
  4. Tell Ark to rename the file.

Actual Results:  
  1. The archive contains one file.
  2. Ark extracts the file.
  3. Ark asks whether it should rename the file.
  4. Ark complains: couldn't create slave: klauncher: unknown protocol

Expected Results:  
  4. Let Ark extract the file under the new name.

OS: Linux (x86_64) release 2.6.34.7-0.7-desktop
Compiler: gcc
Comment 1 Raphael Kubo da Costa 2011-02-13 18:24:46 UTC
The file you have attached seems to be a 99-byte text file, so I could not open it with Ark.

I did, however, create a tar.gz archive with it (tar czf test.tar.gz it-works) then tried to extract it in the same directory the original `it-works' file exists. I clicked 'suggest new name' and then 'Rename' and everything worked fine -- I now have both `it-works' and `it-works 1' in /tmp.
Comment 2 Christopher Yeleighton 2011-02-13 19:30:26 UTC
Created attachment 57219 [details]
maybe this time

Ark fails if you select the file and tell Ark to extract selected.
I confirm it succeeds when you tell Ark to extract all files.
Comment 3 Raphael Kubo da Costa 2011-02-13 20:59:06 UTC
Confirming, thanks.
Comment 4 Raphael Kubo da Costa 2011-02-14 01:23:18 UTC
SVN commit 1220439 by rkcosta:

libarchive: Consider renamed files valid files when extracting.

When one or more files are selected for extraction and they already
exist on the filesystem, if the user chooses to rename it, extraction
will fail for that file. That happens because when we are not
extracting all files, the new file name fails the
files.contains(entryName) check.

We now keep track of the current file being renamed to avoid this
problem.

BUG: 266159
FIXED-IN: 4.6.1



 M  +6 -1      libarchivehandler.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1220439
Comment 5 Raphael Kubo da Costa 2011-02-14 01:26:20 UTC
SVN commit 1220441 by rkcosta:

libarchive: Consider renamed files valid files when extracting.

When one or more files are selected for extraction and they already
exist on the filesystem, if the user chooses to rename it, extraction
will fail for that file. That happens because when we are not
extracting all files, the new file name fails the
files.contains(entryName) check.

We now keep track of the current file being renamed to avoid this
problem.

Forward-port of r1220439.

CCBUG: 266159

 M  +6 -1      libarchivehandler.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1220441
Comment 6 Raphael Kubo da Costa 2011-02-14 01:28:59 UTC
SVN commit 1220442 by rkcosta:

Mention Ark's bug 266159 in the changelog.

CCBUG: 266159


 M  +5 -0      changelog_branch_4_6.xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1220442