Remove redundant checking before remove

This commit is contained in:
Chocobo1 2020-10-23 12:58:57 +08:00
parent 70c4eb44fd
commit 3971a12f0e
No known key found for this signature in database
GPG key ID: 210D9C873253A68C

View file

@ -275,8 +275,7 @@ void CustomStorage::handleCompleteFiles(const QString &savePath)
QFile completeFile {saveDir.absoluteFilePath(completeFilePath)};
if (completeFile.exists()) {
QFile incompleteFile {saveDir.absoluteFilePath(filePath)};
if (incompleteFile.exists())
incompleteFile.remove();
incompleteFile.remove();
completeFile.rename(incompleteFile.fileName());
}
}