MCPcopy Create free account
hub / github.com/MultiMC/Launcher / extractFile

Method extractFile

launcher/MMCZip.cpp:298–312  ·  view source on GitHub ↗

ours

Source from the content-addressed store, hash-verified

296
297// ours
298bool MMCZip::extractFile(QString fileCompressed, QString file, QString target)
299{
300 QuaZip zip(fileCompressed);
301 if (!zip.open(QuaZip::mdUnzip))
302 {
303 // check if this is a minimum size empty zip file...
304 QFileInfo fileInfo(fileCompressed);
305 if(fileInfo.size() == 22) {
306 return true;
307 }
308 qWarning() << "Could not open archive for unzipping:" << fileCompressed << "Error:" << zip.getZipError();
309 return false;
310 }
311 return MMCZip::extractRelFile(&zip, file, target);
312}

Callers

nothing calls this directly

Calls 2

openMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected