diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-01-24 14:41:52 +0100 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2019-01-24 14:41:52 +0100 |
| commit | 75d29f7e0327f57bfa82fa554091591857ab404f (patch) | |
| tree | fe16f2855fa8bcec5a49eda58f8ca19865a39923 /src/mainwindow.cpp | |
| parent | ae794dba3204251fb76d7478a6f003b50301b8c7 (diff) | |
Show windows overwrite dialog when moving and add result message.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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();
}
|
