NOISSUE refactor pack import (extraction and paths)

It now:
* Doesn't extract until it knows the content format is good.
* Extracts in a predictable location, not requiring to use a second path for the actual pack root.
This commit is contained in:
Petr Mrázek
2017-09-04 08:17:25 +02:00
parent b8adbb9b73
commit d80382180e
10 changed files with 129 additions and 58 deletions

View File

@ -146,7 +146,7 @@ void World::readFromZip(const QFileInfo &file)
{
return;
}
auto location = MMCZip::findFileInZip(&zip, "level.dat");
auto location = MMCZip::findFolderOfFileInZip(&zip, "level.dat");
is_valid = !location.isEmpty();
if (!is_valid)
{