Merge pull request #3813 from nextcloud/rakekniven-patch-1

Fixed placeholder numbering
This commit is contained in:
Felix Weilbach 2021-09-20 16:55:02 +02:00 committed by GitHub
commit 76a80fc974
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -395,13 +395,13 @@ bool FileSystem::moveToTrash(const QString &fileName, QString *errorString)
suffix_number++;
}
if (!file.rename(f.absoluteFilePath(), path + QString::number(suffix_number))) { // rename(file old path, file trash path)
*errorString = QCoreApplication::translate("FileSystem", R"(Could not move "%1" to "%1")")
*errorString = QCoreApplication::translate("FileSystem", R"(Could not move "%1" to "%2")")
.arg(f.absoluteFilePath(), path + QString::number(suffix_number));
return false;
}
} else {
if (!file.rename(f.absoluteFilePath(), trashFilePath + f.fileName())) { // rename(file old path, file trash path)
*errorString = QCoreApplication::translate("FileSystem", R"(Could not move "%1" to "%1")")
*errorString = QCoreApplication::translate("FileSystem", R"(Could not move "%1" to "%2")")
.arg(f.absoluteFilePath(), trashFilePath + f.fileName());
return false;
}