MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / extractDir

Method extractDir

launcher/MMCZip.cpp:354–368  ·  view source on GitHub ↗

ours

Source from the content-addressed store, hash-verified

352
353// ours
354std::optional<QStringList> MMCZip::extractDir(QString fileCompressed, QString dir)
355{
356 QuaZip zip(fileCompressed);
357 if (!zip.open(QuaZip::mdUnzip))
358 {
359 // check if this is a minimum size empty zip file...
360 QFileInfo fileInfo(fileCompressed);
361 if(fileInfo.size() == 22) {
362 return QStringList();
363 }
364 qWarning() << "Could not open archive for unzipping:" << fileCompressed << "Error:" << zip.getZipError();;
365 return std::nullopt;
366 }
367 return MMCZip::extractSubDir(&zip, "", dir);
368}
369
370// ours
371std::optional<QStringList> MMCZip::extractDir(QString fileCompressed, QString subdir, QString dir)

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected