From 0d21749568cfcb98910132a011a3342845db4023 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Wed, 14 Jan 2026 00:17:17 +0200 Subject: [PATCH] accept libarchive warning result this is the intended behavior to treat warnings as ok, because teoretically the file was extracted, even if the time of the file can't be set Signed-off-by: Trial97 (cherry picked from commit a6d6ff9926c6e35f5daf640d8a6621c0e9653d83) --- launcher/InstanceImportTask.cpp | 2 -- launcher/archive/ArchiveReader.cpp | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/launcher/InstanceImportTask.cpp b/launcher/InstanceImportTask.cpp index bbf36037e..cd168dee2 100644 --- a/launcher/InstanceImportTask.cpp +++ b/launcher/InstanceImportTask.cpp @@ -154,13 +154,11 @@ void InstanceImportTask::processZipPack() qDebug() << "Flame:" << true; m_modpackType = ModpackType::Flame; stop = true; - return true; } else if (QFileInfo fileInfo(fileName); fileInfo.fileName() == "instance.cfg") { qDebug() << "MultiMC:" << true; m_modpackType = ModpackType::MultiMC; root = cleanPath(fileInfo.path()); stop = true; - return true; } QCoreApplication::processEvents(); return true; diff --git a/launcher/archive/ArchiveReader.cpp b/launcher/archive/ArchiveReader.cpp index d29963c6d..f56fd0f0a 100644 --- a/launcher/archive/ArchiveReader.cpp +++ b/launcher/archive/ArchiveReader.cpp @@ -151,7 +151,7 @@ bool ArchiveReader::File::writeFile(archive* out, QString targetFileName, bool n auto r = archive_write_finish_entry(out); if (r < ARCHIVE_OK) qCritical() << "Failed to finish writing entry:" << archive_error_string(out); - return (r > ARCHIVE_WARN); + return (r >= ARCHIVE_WARN); } bool ArchiveReader::parse(std::function doStuff) @@ -180,6 +180,7 @@ bool ArchiveReader::parse(std::function doStuff) archive_read_close(a); return true; } + bool ArchiveReader::parse(std::function doStuff) { return parse([doStuff](File* f, bool&) { return doStuff(f); });