With autodetect, extract single files archive in current dir
ClosedPublic

Authored by meven on Sep 3 2019, 11:08 AM.

Details

Summary

Treat single files archive as single folder archive basically.

Test Plan

ctest

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
meven created this revision.Sep 3 2019, 11:08 AM
Restricted Application added a project: Ark. · View Herald TranscriptSep 3 2019, 11:08 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
meven requested review of this revision.Sep 3 2019, 11:08 AM

Hmm I don't know, this might break some workflows :/
Basically with "autodetect subfolder" you can always assume that a folder will be created and some poeple might rely on this.

What is your motivation for this change?

Hmm I don't know, this might break some workflows :/
Basically with "autodetect subfolder" you can always assume that a folder will be created and some poeple might rely on this.

What is your motivation for this change?

When you have a single file archive and you extract it using autodetect, it creates a folder with the file in it.
Then you need to open the dir to discover that there is a single file.
A common pattern of mine (and I guess others) has been to discover that there had only one file, and right after cut it to its parent folder and deleting the folder.
A workaround is to open the archive and in case there is one file using "Extract here" and if not "Extract autodetect".
But it is a long process that negates the use of "Extract autodetect" as a short path feature.

It seems to me the change of behavior justifies itself in that it will most likely improve users workflow for single file archives.

Do you have an opinion @ngraham ?

elvisangelaccio accepted this revision.Sep 13 2019, 8:39 AM
elvisangelaccio added inline comments.
app/main.cpp
194

I'd write "single file archive" to be more explicit.

This revision is now accepted and ready to land.Sep 13 2019, 8:39 AM
meven updated this revision to Diff 65956.Sep 13 2019, 8:43 AM

Improve help text, rebase

meven marked an inline comment as done.Sep 13 2019, 8:43 AM
elvisangelaccio accepted this revision.Sep 13 2019, 8:49 AM
meven retitled this revision from With autodetect, extract single files archive in destination dir to With autodetect, extract single files archive in current dir.Sep 13 2019, 8:57 AM
meven edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.