summaryrefslogtreecommitdiff
path: root/src/transfersavesdialog.cpp
diff options
context:
space:
mode:
authorBrian Munro <brian.alexander.munro@gmail.com>2017-12-08 19:41:04 +0200
committerGitHub <noreply@github.com>2017-12-08 19:41:04 +0200
commit0aaece55d8b5bb392523db4ee96029d0567294e8 (patch)
treeb54e386cf49645dc5739c06c6c809ca4b80220c6 /src/transfersavesdialog.cpp
parent7c80181e010af25a2d1d0df12f4c715aa6a7bed9 (diff)
parentef21bd6193e6d0bebe356dd3401dafcf064c3aa6 (diff)
Merge pull request #138 from Silarn/mainline_dev
Fixes for local saves and configuration handling
Diffstat (limited to 'src/transfersavesdialog.cpp')
-rw-r--r--src/transfersavesdialog.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp
index e130b1ae..b8dda056 100644
--- a/src/transfersavesdialog.cpp
+++ b/src/transfersavesdialog.cpp
@@ -334,6 +334,26 @@ bool TransferSavesDialog::transferCharacters(
sourceFile.absoluteFilePath().toUtf8().constData(),
destinationFile.toUtf8().constData());
}
+
+ QFileInfo sourceFileSE(sourceFile.absolutePath() + "/" + sourceFile.completeBaseName() + "." + m_GamePlugin->savegameSEExtension());
+ if (sourceFileSE.exists()) {
+ QString destinationFileSE(destination.absoluteFilePath(sourceFileSE.fileName()));
+
+ //If the file is already there, let them skip (or not).
+ if (QFile::exists(destinationFileSE)) {
+ if (!testOverwrite(overwriteMode, destinationFileSE)) {
+ continue;
+ }
+ //OK, they want to remove it.
+ QFile::remove(destinationFileSE);
+ }
+
+ if (!method(sourceFileSE.absoluteFilePath(), destinationFileSE)) {
+ qCritical(errmsg,
+ sourceFileSE.absoluteFilePath().toUtf8().constData(),
+ destinationFileSE.toUtf8().constData());
+ }
+ }
}
}
return true;