feat(cpn): model notes and checklist files packaged with model files (#6578)
This commit is contained in:
@@ -90,12 +90,17 @@ bool EtxFormat::write(const RadioData & radioData)
|
||||
return result;
|
||||
}
|
||||
|
||||
bool EtxFormat::loadFile(QByteArray & filedata, const QString & filename)
|
||||
bool EtxFormat::loadFile(QByteArray & filedata, const QString & filename, bool optional)
|
||||
{
|
||||
size_t size;
|
||||
void * data = mz_zip_reader_extract_file_to_heap(&zip_archive, qPrintable(filename), &size, 0);
|
||||
if (!data) {
|
||||
return false;
|
||||
if (optional) {
|
||||
//qDebug() << "File not found:" << filename;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << QString("Extracted file %1, size=%2").arg(filename).arg(size);
|
||||
|
||||
Reference in New Issue
Block a user