Fix: Make sure the path for the json-files and the decive-controller is correct.
This commit is contained in:
parent
0b4eed9dc0
commit
37aae73f21
17
worker.cpp
17
worker.cpp
@ -666,7 +666,9 @@ bool Worker::filesToUpdate() {
|
||||
if (dir.exists()) {
|
||||
QStringList jsons = dir.entryList(QStringList() << "DC2C*.json", QDir::Files);
|
||||
if (!jsons.isEmpty()) {
|
||||
m_filesToUpdate << jsons;
|
||||
for (QStringList::size_type i=0; i<jsons.size(); ++i) {
|
||||
m_filesToUpdate << QDir::cleanPath(QString("etc/psa_config/") + jsons.at(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -679,7 +681,7 @@ bool Worker::filesToUpdate() {
|
||||
QStringList dc = dir.entryList(QStringList() << "dc2c.bin", QDir::Files,
|
||||
QDir::SortFlag::Time | QDir::SortFlag::Reversed);
|
||||
if (!dc.isEmpty()) {
|
||||
m_filesToUpdate << dc.first();
|
||||
m_filesToUpdate << QDir::cleanPath(QString("etc/dc/") + dc.first());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -836,7 +838,16 @@ bool Worker::downloadFilesToPSAHardware() {
|
||||
m_pluginName,
|
||||
m_workingDirectory);
|
||||
|
||||
return update.doUpdate(m_displayIndex, m_filesToDownload);
|
||||
if (update.doUpdate(m_displayIndex, m_filesToDownload)) {
|
||||
// prepared for use: at the moment, the dc-library does not work
|
||||
// as expected.
|
||||
|
||||
// static const QRegularExpression re("^.*\\.json$");
|
||||
// return update.checkDownloadedJsonVersions(m_filesToDownload.filter(re));
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
CONSOLE(QStringList("NO FILES TO DOWNLOAD TO PSA-HW")) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE;
|
||||
setProgress(_DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE);
|
||||
|
Loading…
Reference in New Issue
Block a user