Browse Source

Remove redundant checking before remove

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
3971a12f0e
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 3
      src/base/bittorrent/customstorage.cpp

3
src/base/bittorrent/customstorage.cpp

@ -275,8 +275,7 @@ void CustomStorage::handleCompleteFiles(const QString &savePath) @@ -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());
}
}

Loading…
Cancel
Save