shared: FileSaver: addFile(): Consider fillExistingContentless
Tá an tiomantas seo le fáil i:
tuismitheoir
5c899af26f
tiomantas
5272365e5a
@ -25,10 +25,22 @@ SaveFileResult FileSaver::addFile(QString path)
|
|||||||
QString absPath = info.absoluteFilePath();
|
QString absPath = info.absoluteFilePath();
|
||||||
|
|
||||||
auto mtime = info.lastModified().toSecsSinceEpoch();
|
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 SKIPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return saveFile(info);
|
return saveFile(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Á lódáil...
x
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir