This solves the problem of having failed renames but doesn't actually do renames that only change case.
QString newFileString = newFilePath + "/" + newFileName;
QFileInfo newFile(newFileString);
+#ifdef Q_OS_WIN
+ bool isSamePath = oldFile.canonicalFilePath().compare(newFileString, Qt::CaseInsensitive) == 0;
+#else
bool isSamePath = oldFile.canonicalFilePath() == newFileString;
+#endif
if (isSamePath)
{
{
fl.failedRename = true;
db->setFileLocation(fl);
- db->log(tr("Rename: Failed to rename file <%1>. Destination path <%2> does not exists and could not be created.").arg(oldFile.filePath()).arg(newFile.canonicalPath()), 2);
+ db->log(tr("Rename: Failed to rename file <%1>. Destination path <%2> does not exist and could not be created.").arg(oldFile.filePath()).arg(newFile.canonicalPath()), 2);
continue;
}
}