From 75d29f7e0327f57bfa82fa554091591857ab404f Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 24 Jan 2019 14:41:52 +0100 Subject: Show windows overwrite dialog when moving and add result message. --- src/mainwindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8a4ed854..a2671829 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -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(); } -- cgit v1.3.1