Bug 155220

Summary: extraxt all files doesn't work
Product: [Applications] ark Reporter: sts
Component: generalAssignee: Harald Hvaal <metellius>
Status: RESOLVED FIXED    
Severity: normal CC: michal, rakuco
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: if going to extract all, passes an empty list to extract
make karchive extract all when file list is empty
make bk extract all when file list is empty

Description sts 2008-01-07 11:38:13 UTC
Version:           2.9.999 (using KDE 3.97.2 (KDE 4.0 >= 20080101) "release 4.2", compiled sources)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.22.13-0.3-default

test case:
http://bugs.kde.org/attachment.cgi?id=21574&action=view

select extract -> All files -> hmh.. it doesn't work.. he extract only my selected file..
Comment 1 FiNeX 2008-01-10 10:32:06 UTC
Because you've selected only one file.
On Ark in KDE4.0.0 it doesn't extract anything unless it is selected.
Comment 2 Haris Kouzinopoulos 2008-01-10 11:21:04 UTC
This is definitely a bug. When the user chooses to extract all files, Ark should extract all files, not just the selected. Moreover when no file is selected, the user should be given the option to extract all files. 
Comment 3 Renan Inácio 2008-01-12 21:47:00 UTC
Created attachment 22973 [details]
if going to extract all, passes an empty list to extract

Extract all was not working because it always passed a list with the selected
files to extraction.
Instead of passing a list with all files, passing an empty list gives the
chance to the backend better handle the action.
Comment 4 Renan Inácio 2008-01-12 21:49:47 UTC
Created attachment 22974 [details]
make karchive extract all when file list is empty

Updates the karchive plugin.
Comment 5 Renan Inácio 2008-01-12 22:50:46 UTC
Created attachment 22975 [details]
make bk extract all when file list is empty

Updates the bk plugin.
Comment 6 sts 2008-07-02 15:09:07 UTC
ping, the same with 4.0.84
Comment 7 Michal Borek 2008-07-04 10:49:08 UTC
I got the same on 2.9.999
Comment 8 Romain D. 2008-07-31 21:10:02 UTC
Version 2.10.999
Sous KDE 4.1.00 (KDE 4.1.0)
KDE 4.1.0 is no released and the problem stays. Is someone doing something to correct this ? I think it should be considered as an important bug (makes Ark unusable while this soft is one of the most used under KDE...)
Comment 9 Harald Hvaal 2008-08-19 16:08:23 UTC
Fixed with svn commit 849401.
Did not appear here automatically for some reason, maybe it's the new bugzilla.

diff --git a/part/part.cpp b/part/part.cpp
index 6f8a194..087a837 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -458,7 +458,14 @@ void Part::slotExtractFiles()
                }
                else destinationDirectory = 
dialog.destinationDirectory().path();

-               QList<QVariant> files = selectedFilesWithParents();
+               QList<QVariant> files;
+
+               //if the user has chosen to extract only selected entries, 
fetch these
+               //from the listview
+               if (!dialog.extractAllFiles()) {
+                       files = selectedFilesWithParents();
+               }
+
                kDebug( 1601 ) << "Selected " << files;
                ExtractJob *job = m_model->extractFiles( files, 
destinationDirectory, dialog.preservePaths(
                m_jobTracker->registerJob( job );