Show windows overwrite dialog when moving and add result message.

This commit is contained in:
Al
2019-01-24 14:41:52 +01:00
parent ae794dba32
commit 75d29f7e03
+9 -2
View File
@@ -3550,8 +3550,15 @@ void MainWindow::doMoveOverwriteContentToMod(const QString &modAbsolutePath)
return std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end(); });
ModInfo::Ptr overwriteInfo = ModInfo::getByIndex(overwriteIndex);
shellMove((QDir::toNativeSeparators(overwriteInfo->absolutePath()) + "\\*"),
(QDir::toNativeSeparators(modAbsolutePath)), true, this);
bool successful = shellMove((QDir::toNativeSeparators(overwriteInfo->absolutePath()) + "\\*"),
(QDir::toNativeSeparators(modAbsolutePath)), false, this);
if (successful) {
MessageDialog::showMessage(tr("Move successful."), this);
}
else {
qCritical("Move operation failed: %s", qUtf8Printable(windowsErrorString(::GetLastError())));
}
m_OrganizerCore.refreshModList();
}