1
0

shared: FileSaver: addFile(): Consider fillExistingContentless

Este cometimento está contido em:
Albert S. 2023-03-26 15:43:21 +02:00
ascendente 5c899af26f
cometimento 5272365e5a

Ver ficheiro

@ -25,10 +25,22 @@ SaveFileResult FileSaver::addFile(QString path)
QString absPath = info.absoluteFilePath();
auto mtime = info.lastModified().toSecsSinceEpoch();
if(this->dbService->fileExistsInDatabase(absPath, mtime))
bool exists = false;
if(this->fileSaverOptions.fillExistingContentless)
{
exists = this->dbService->fileExistsInDatabase(absPath, mtime, 'c');
}
else
{
exists = this->dbService->fileExistsInDatabase(absPath, mtime);
}
if(exists)
{
return SKIPPED;
}
return saveFile(info);
}