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

Function extractDir

launcher/MMCZip.cpp:372–386  ·  view source on GitHub ↗

ours

Source from the content-addressed store, hash-verified

370
371// ours
372std::optional<QStringList> extractDir(QString fileCompressed, QString dir)
373{
374 QuaZip zip(fileCompressed);
375 if (!zip.open(QuaZip::mdUnzip)) {
376 // check if this is a minimum size empty zip file...
377 QFileInfo fileInfo(fileCompressed);
378 if (fileInfo.size() == 22) {
379 return QStringList();
380 }
381 qWarning() << "Could not open archive for unpacking:" << fileCompressed << "Error:" << zip.getZipError();
382 ;
383 return std::nullopt;
384 }
385 return extractSubDir(&zip, "", dir);
386}
387
388// ours
389std::optional<QStringList> extractDir(QString fileCompressed, QString subdir, QString dir)

Callers 3

extractModsMethod · 0.85
downloadSucceededMethod · 0.85
unpackArchiveMethod · 0.85

Calls 3

extractSubDirFunction · 0.85
openMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected