Don't check 'Extraction into subfolder' with single-file archives
ClosedPublic

Authored by elvisangelaccio on Dec 30 2016, 3:59 PM.

Details

Summary

The ExtractionDialog only needs to know if it should enable the 'Extraction
into subfolder' groupbox, not why. We rename setIsSingleFolder() to
setExtractToSubfolder() and we call it with
archive->hasMultipleTopLevelEntries() as argument.
This fixes the regression with single-file archives.

CCBUG: 374253

Test Plan

Open a single-file archive, open the extraction dialog. The 'Extraction into
subfolder' groupbox is now unchecked.

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.
elvisangelaccio retitled this revision from to Don't check 'Extraction into subfolder' with single-file archives.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a project: Ark. · View Herald TranscriptDec 30 2016, 3:59 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript

What about quick extractions? We should probably do the same there. I'm not sure about batch-extractions, instead: "autodetect folder" does not necessarily mean "force subfolder"...

What about quick extractions? We should probably do the same there. I'm not sure about batch-extractions, instead: "autodetect folder" does not necessarily mean "force subfolder"...

But the ark docbook says:

Extract Archive Here, Autodetect Subfolder creates a subfolder in the folder with the archive and extracts the folders and files into it.

so ok, let's not change this behavior.

rthomsen accepted this revision.Mar 5 2017, 5:52 PM

Tested and it fixes the bug. And yes, quick-extractions should behave the same way.

This revision is now accepted and ready to land.Mar 5 2017, 5:52 PM