fix handling of archives with a folder in them
ClosedPublic

Authored by mart on Jan 9 2017, 2:40 PM.

Details

Summary

package archives are found in the wild in 2 forms:
with the files (including metadata at the root, or with
just one folder at the root.
in the second case which was supposed to be managed, the procedure
was incorrect as QFileInfo::path() will be the name of the
folder the file (or subdirectory) is into, not the file name, which we need

BUG:374782

Test Plan

kpackagetool5 -i of a downloaded l&f file works now without explicitly
setting the type, the warning about missing metadata is not visible anymore

Diff Detail

Repository
R290 KPackage
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart updated this revision to Diff 9916.Jan 9 2017, 2:40 PM
mart retitled this revision from to fix handling of archives with a folder in them.
mart updated this object.
mart edited the test plan for this revision. (Show Details)
mart added a reviewer: Plasma.
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJan 9 2017, 2:40 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
apol added a subscriber: apol.Jan 9 2017, 4:43 PM

Can you add a test for the case?

mart added a comment.Jan 9 2017, 5:13 PM
In D4043#75627, @apol wrote:

Can you add a test for the case?

not sure if i like adding a tarball in the repository..

mart updated this revision to Diff 9937.Jan 9 2017, 6:04 PM
  • add a test
apol accepted this revision.Jan 9 2017, 6:07 PM
apol added a reviewer: apol.
This revision is now accepted and ready to land.Jan 9 2017, 6:07 PM
This revision was automatically updated to reflect the committed changes.