1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

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());
}
}