Bug 446728

Summary: Mention resulting filename when doing "compress here" for multiple files
Product: [Applications] ark Reporter: Nishith Khanna <nishith.khanna>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED FIXED    
Severity: wishlist CC: aacid, nate, qydwhotmail, rthomsen6
Priority: NOR Keywords: usability
Version: 21.08.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 22.04
Attachments: Current implementation doesn't mention what the archive filename will be

Description Nishith Khanna 2021-12-09 12:37:30 UTC
Created attachment 144390 [details]
Current implementation doesn't mention what the archive filename will be

When doing compress here via dolphin it doesn't mention what will be the filename of the archive when the compression is done. Maybe to fix that it can say Here (as name.TAR.GZ) and Here (as name.zip).
So that the user can know what will be the name of the archive when the process is finished. As currently when compressing multiple files/folders it takes the name of parent folder as the filename. So to make that clear maybe that name can be added in the context menu itself. 

Other workaround can be adding a dialog when clicking on compress here, user can enter any name of their choice.

The idea behind this request is to make the archive filename clearer to user so he/she can find it easily.


Operating System: Arch Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.6-arch2-1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 11.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Comment 1 Nate Graham 2021-12-09 15:51:37 UTC
When compressing a single file, the resulting archive is "<original filename>.<archive extension>" which i think is fairly logical.

But for the multi file case, the resulting archive is "Archive.<archive extension>". I think the issue is not so much that it doesn't tell you what the destination filename will be, but rather that it doesn't give you the chance to change it. So you don't
Comment 2 Bug Janitor Service 2021-12-09 16:50:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/82
Comment 3 Fushan Wen 2022-02-04 17:28:08 UTC
Git commit 483804dbbfb0848ecd51fe7ed7f450d97823de86 by Fushan Wen.
Committed on 04/02/2022 at 15:28.
Pushed by ngraham into branch 'master'.

app/compressfileitemaction: Show archive name in menu actions

The user may be confused by the auto naming rule, so add the archive
name to menu actions, just like 7-zip does.

M  +24   -10   app/compressfileitemaction.cpp
M  +1    -1    kerfuffle/addtoarchive.cpp

https://invent.kde.org/utilities/ark/commit/483804dbbfb0848ecd51fe7ed7f450d97823de86
Comment 4 Fushan Wen 2022-02-04 17:28:16 UTC
Git commit 77606102773a9f5b4ce20ed441e54dfbf5b589a5 by Fushan Wen.
Committed on 04/02/2022 at 15:28.
Pushed by ngraham into branch 'master'.

kerfuffle/addtoarchive: Add getFileName()

The static function allows generating the archive name from a list of
QUrls.

M  +24   -4    kerfuffle/addtoarchive.cpp
M  +4    -0    kerfuffle/addtoarchive.h

https://invent.kde.org/utilities/ark/commit/77606102773a9f5b4ce20ed441e54dfbf5b589a5
Comment 5 Bug Janitor Service 2022-02-04 17:57:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/96
Comment 6 Méven Car 2022-02-08 22:15:55 UTC
Git commit f3719d9649822dfe47c39b4d9db00a067ce87852 by Méven Car, on behalf of Nate Graham.
Committed on 08/02/2022 at 21:20.
Pushed by meven into branch 'ngraham/ark-use-simpler-multi-file-archive-name'.

Use a better and simpler default name for multi-file archives

Now the default name of a multi-file archive created from the file
actions plugin (i.e. from Dolphin's context menu) will be
"Archive.[extension]", not "[name of parent folder].[extension]". That
was a weird default filename choice.

This partially reverts 77606102773a9f5b4ce20ed441e54dfbf5b589a5, which
added a function that is no longer needed; that function has been
removed.

M  +3    -10   app/compressfileitemaction.cpp
M  +1    -12   kerfuffle/addtoarchive.cpp
M  +0    -2    kerfuffle/addtoarchive.h

https://invent.kde.org/utilities/ark/commit/f3719d9649822dfe47c39b4d9db00a067ce87852
Comment 7 Bug Janitor Service 2022-02-08 22:22:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/98
Comment 8 Méven Car 2022-02-13 15:37:35 UTC
Git commit 3e3a0a5dfaf3e504f6b3dfb2a40977651e4a8110 by Méven Car, on behalf of Nate Graham.
Committed on 12/02/2022 at 14:40.
Pushed by meven into branch 'ngraham/ark-use-simpler-multi-file-archive-name'.

Use a better and simpler default name for multi-file archives

Now the default name of a multi-file archive created from the file
actions plugin (i.e. from Dolphin's context menu) will be
"Archive.[extension]", not "[name of parent folder].[extension]". That
was a weird default filename choice.

This partially reverts 77606102773a9f5b4ce20ed441e54dfbf5b589a5, which
added a function that is no longer needed; that function has been
removed.

M  +3    -10   app/compressfileitemaction.cpp
M  +1    -12   kerfuffle/addtoarchive.cpp
M  +0    -2    kerfuffle/addtoarchive.h

https://invent.kde.org/utilities/ark/commit/3e3a0a5dfaf3e504f6b3dfb2a40977651e4a8110
Comment 9 Bug Janitor Service 2022-02-13 20:45:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/101
Comment 10 Méven Car 2022-02-26 12:12:04 UTC
Git commit 88611c6ffe85f6f9a076bae9091466ba872edd43 by Méven Car.
Committed on 26/02/2022 at 12:11.
Pushed by meven into branch 'master'.

Use a better and simpler default name for multi-file archives

Now the default name of a multi-file archive created from the file actions plugin is the common prefix of those file's filename or "Archive.\[extension\]", if they don't match, instead of "\[name of parent folder\].\[extension\]".

aka:  
"Screenshot_123.jpg", "Screenshot_1234.jpg" => "Screenshot_123.\[extension\]"  
"cats.jpg", "dogs.jpg" => "Archive.\[extension\]"

M  +13   -15   app/compressfileitemaction.cpp
M  +1    -1    app/compressfileitemaction.h
M  +18   -32   autotests/kerfuffle/addtoarchivetest.cpp
M  +57   -47   kerfuffle/addtoarchive.cpp
M  +2    -5    kerfuffle/addtoarchive.h

https://invent.kde.org/utilities/ark/commit/88611c6ffe85f6f9a076bae9091466ba872edd43