Check if json-file to be downloaded to device-controller is empty before
starting a download.
This commit is contained in:
parent
7d38cc1269
commit
9b087f62f9
@ -414,7 +414,7 @@ bool Update::downloadJson(enum FileTypeJson type,
|
||||
QFileInfo fi(jsFileToSendToDC); // max. size of template file is 800 bytes
|
||||
if (file.exists()) {
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
if (fi.size() <= 800) {
|
||||
if (fi.size() > 0 && fi.size() <= 800) {
|
||||
QByteArray ba = file.readAll();
|
||||
// kindOfFile: 1=config, 2=device, 3=cash, 4=serial, 5=time, 6=printer
|
||||
// nrOfTemplate=1...32 if kindOfFile==6
|
||||
|
Loading…
Reference in New Issue
Block a user