fix merge conflicts

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2025-09-24 16:25:33 +03:00
parent aa265a45ee
commit 7962e223ab

View File

@@ -106,12 +106,11 @@ bool processZIP(DataPack* pack, ProcessingLevel level)
MMCZip::ArchiveReader zip(pack->fileinfo().filePath());
bool metaParsed = false;
bool directoryFound = false;
bool iconParsed = false;
bool mcmeta_result = false;
bool pack_png_result = false;
if (!zip.parse([&metaParsed, &directoryFound, &iconParsed, &mcmeta_result, &pack_png_result, pack, level](
MMCZip::ArchiveReader::File* f, bool& breakControl) {
if (!zip.parse(
[&metaParsed, &iconParsed, &mcmeta_result, &pack_png_result, pack, level](MMCZip::ArchiveReader::File* f, bool& breakControl) {
bool skip = true;
if (!metaParsed && f->filename() == "pack.mcmeta") {
metaParsed = true;
@@ -125,12 +124,6 @@ bool processZIP(DataPack* pack, ProcessingLevel level)
return true; // mcmeta invalid
}
}
if (!directoryFound) {
QString normalizedPath = QDir::cleanPath(pack->directory()) + QLatin1Char('/');
if (normalizedPath.startsWith('/'))
normalizedPath.remove(0, 1);
directoryFound = f->filename().startsWith(normalizedPath, Qt::CaseInsensitive);
}
if (!iconParsed && level != ProcessingLevel::BasicInfoOnly && f->filename() == "pack.png") {
iconParsed = true;
skip = false;
@@ -145,7 +138,7 @@ bool processZIP(DataPack* pack, ProcessingLevel level)
if (skip) {
f->skip();
}
if (metaParsed && directoryFound && (level == ProcessingLevel::BasicInfoOnly || iconParsed)) {
if (metaParsed && (level == ProcessingLevel::BasicInfoOnly || iconParsed)) {
breakControl = true;
}
@@ -157,9 +150,6 @@ bool processZIP(DataPack* pack, ProcessingLevel level)
qWarning() << "Data pack at" << pack->fileinfo().filePath() << "does not have a valid pack.mcmeta";
return false; // the mcmeta is not optional
}
if (!directoryFound) {
return false; // data dir does not exists at zip root
}
if (level == ProcessingLevel::BasicInfoOnly) {
return true; // only need basic info already checked