Commit d3ea57b7 authored by Albert Astals Cid's avatar Albert Astals Cid

Backport 39b33ddd1e21c017bea3e0e1ad9ac7c4cd2ace83 from KF5

parent 1e9ba7d0
......@@ -430,10 +430,15 @@ QStringList Installation::installDownloadedFileAndUncompress(const KNS3::EntryIn
if (isarchive) {
const KArchiveDirectory *dir = archive->directory();
dir->copyTo(installdir);
//if there is more than an item in the file,
//put contents in a subdirectory with the same name as the file
if (dir->entries().count() > 1) {
installpath = installdir + QLatin1Char('/') + QFileInfo(archive->fileName()).baseName();
}
dir->copyTo(installpath);
installedFiles << archiveEntries(installdir, dir);
installedFiles << installdir + '/';
installedFiles << archiveEntries(installpath, dir);
installedFiles << installpath + '/';
archive->close();
QFile::remove(payloadfile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment