MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / extractFile

Function extractFile

launcher/MMCZip.cpp:406–419  ·  view source on GitHub ↗

ours

Source from the content-addressed store, hash-verified

404
405// ours
406bool extractFile(QString fileCompressed, QString file, QString target)
407{
408 QuaZip zip(fileCompressed);
409 if (!zip.open(QuaZip::mdUnzip)) {
410 // check if this is a minimum size empty zip file...
411 QFileInfo fileInfo(fileCompressed);
412 if (fileInfo.size() == 22) {
413 return true;
414 }
415 qWarning() << "Could not open archive for unpacking:" << fileCompressed << "Error:" << zip.getZipError();
416 return false;
417 }
418 return extractRelFile(&zip, file, target);
419}
420
421bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter)
422{

Callers 5

extractSubDirFunction · 0.85
extractRelFileFunction · 0.85
extractZipMethod · 0.85
extractModsMethod · 0.85
unzipNativesFunction · 0.85

Calls 3

extractRelFileFunction · 0.85
openMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected