Bug 279861 - When packing multiple selected files - use containing folder name
Summary: When packing multiple selected files - use containing folder name
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 2.16
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords: junior-jobs
: 306288 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-11 05:48 UTC by Victor Varvaryuk
Modified: 2016-03-10 22:25 UTC (History)
4 users (show)

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


Attachments
Ark automatically names the archive by first selected file (43.89 KB, image/png)
2011-08-11 05:48 UTC, Victor Varvaryuk
Details
Similar happens when using 'Compress to...' (74.36 KB, image/png)
2011-08-11 05:57 UTC, Victor Varvaryuk
Details
patch (813 bytes, patch)
2014-03-17 16:51 UTC, florian.schunk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Varvaryuk 2011-08-11 05:48:28 UTC
Created attachment 62740 [details]
Ark automatically names the archive by first selected file

Version:           2.16 (using KDE 4.7.0) 
OS:                Linux

Version 2.17
When in a folder i select multiple files to pack [Context Menu -> Compress -> As ZIP Archive] Ark automatically names the archive by first selected file.
WinRAR uses in such cases name of the containing folder.


Reproducible: Always



Expected Results:  
If i select two files inside a folder called 'Test', the archive of them is called 'Test.zip'
Comment 1 Victor Varvaryuk 2011-08-11 05:57:54 UTC
Created attachment 62741 [details]
Similar happens when using 'Compress to...'

When in a folder i select multiple files to pack [Context Menu -> Compress ->
Compress to...] Ark opens a dialog without suggesting a name of the archive - which should be name of the containing folder.
Comment 2 florian.schunk 2014-03-17 16:51:53 UTC
Created attachment 85614 [details]
patch
Comment 3 Raphael Kubo da Costa 2014-03-18 23:08:22 UTC
Hi Florian,

Thanks for the patch. Please send it via ReviewBoard [1], which is what we use for code review.

[1] http://techbase.kde.org/Reviewboard

Glancing over the patch: please adjust the coding style (there are some extra empty lines, a comment that starts with a lowercase character, has no leading space and no period at the end and the operator in the if is not surrounded by spaces). If in doubt, follow the style of the surrounding code or take a look at http://techbase.kde.org/Policies/Kdelibs_Coding_Style, which we also use in Ark.

Cheers!
Comment 4 Raphael Kubo da Costa 2014-04-05 20:07:43 UTC
*** Bug 306288 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2014-04-19 15:44:30 UTC
Florian, any progress with comment #3?
Comment 6 Raphael Kubo da Costa 2014-04-21 22:00:59 UTC
(In reply to comment #5)
> Florian, any progress with comment #3?

We're tracking it in https://git.reviewboard.kde.org/r/116890/
Comment 7 Elvis Angelaccio 2016-03-10 22:25:44 UTC
Git commit 80080c9e8eb2d4c51a1195190182026e0a78a035 by Elvis Angelaccio, on behalf of Chantara Tith.
Committed on 10/03/2016 at 22:24.
Pushed by elvisangelaccio into branch 'Applications/15.12'.

Use containing-folder name when packing multiple selected files
FIXED-IN: 15.12.3

Differential Revision: D1111

M  +19   -4    kerfuffle/addtoarchive.cpp
M  +1    -0    kerfuffle/addtoarchive.h

http://commits.kde.org/ark/80080c9e8eb2d4c51a1195190182026e0a78a035