|
|
@ -78,8 +78,7 @@ void BitTorrent::AbstractFileStorage::renameFile(const QString &oldPath, const Q |
|
|
|
|
|
|
|
|
|
|
|
if ((renamingFileIndex < 0) && areSameFileNames(path, oldFilePath)) |
|
|
|
if ((renamingFileIndex < 0) && areSameFileNames(path, oldFilePath)) |
|
|
|
renamingFileIndex = i; |
|
|
|
renamingFileIndex = i; |
|
|
|
|
|
|
|
else if (areSameFileNames(path, newFilePath)) |
|
|
|
if (areSameFileNames(path, newFilePath)) |
|
|
|
|
|
|
|
throw RuntimeError {tr("The file already exists: '%1'.").arg(newFilePath)}; |
|
|
|
throw RuntimeError {tr("The file already exists: '%1'.").arg(newFilePath)}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -124,8 +123,7 @@ void BitTorrent::AbstractFileStorage::renameFolder(const QString &oldPath, const |
|
|
|
|
|
|
|
|
|
|
|
if (path.startsWith(oldFolderPath, CASE_SENSITIVITY)) |
|
|
|
if (path.startsWith(oldFolderPath, CASE_SENSITIVITY)) |
|
|
|
renamingFileIndexes.append(i); |
|
|
|
renamingFileIndexes.append(i); |
|
|
|
|
|
|
|
else if (path.startsWith(newFolderPath, CASE_SENSITIVITY)) |
|
|
|
if (path.startsWith(newFolderPath, CASE_SENSITIVITY)) |
|
|
|
|
|
|
|
throw RuntimeError {tr("The folder already exists: '%1'.").arg(newFolderPath)}; |
|
|
|
throw RuntimeError {tr("The folder already exists: '%1'.").arg(newFolderPath)}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|