shared: FileSaver: Don't launch SandboxedProcessor for empty files

This commit is contained in:
Albert S. 2022-06-24 17:44:44 +02:00
vanhempi 614238edda
commit b8006bde7b

Näytä tiedosto

@ -124,6 +124,8 @@ SaveFileResult FileSaver::saveFile(const QFileInfo &fileInfo)
} }
} }
if(fileInfo.size() > 0)
{
QProcess process; QProcess process;
QStringList args; QStringList args;
args << "process" << canonicalPath; args << "process" << canonicalPath;
@ -156,6 +158,7 @@ SaveFileResult FileSaver::saveFile(const QFileInfo &fileInfo)
return static_cast<SaveFileResult>(processorReturnCode); return static_cast<SaveFileResult>(processorReturnCode);
} }
} }
}
SaveFileResult result = this->dbService->saveFile(fileInfo, pageData); SaveFileResult result = this->dbService->saveFile(fileInfo, pageData);
if(result == OK && processorReturnCode == OK_WASEMPTY) if(result == OK && processorReturnCode == OK_WASEMPTY)
{ {