fix handling of archives with a folder in them
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
Reviewers: Plasma, apol
Reviewed By: apol
Subscribers: apol, plasma-devel, Frameworks
Tags: Plasma, Frameworks
Differential Revision: https://phabricator.kde.org/D4043