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

Method extractFile

launcher/MMCZip.cpp:388–402  ·  view source on GitHub ↗

ours

Source from the content-addressed store, hash-verified

386
387// ours
388bool MMCZip::extractFile(QString fileCompressed, QString file, QString target)
389{
390 QuaZip zip(fileCompressed);
391 if (!zip.open(QuaZip::mdUnzip))
392 {
393 // check if this is a minimum size empty zip file...
394 QFileInfo fileInfo(fileCompressed);
395 if(fileInfo.size() == 22) {
396 return true;
397 }
398 qWarning() << "Could not open archive for unzipping:" << fileCompressed << "Error:" << zip.getZipError();
399 return false;
400 }
401 return MMCZip::extractRelFile(&zip, file, target);
402}
403
404bool MMCZip::collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList *files,
405 MMCZip::FilterFunction excludeFilter) {

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected