summaryrefslogtreecommitdiff
path: root/src/transfersavesdialog.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2017-12-08 02:42:34 -0600
committerJeremy Rimpo <jrim@rimpo.org>2017-12-08 02:42:34 -0600
commitef21bd6193e6d0bebe356dd3401dafcf064c3aa6 (patch)
treeb54e386cf49645dc5739c06c6c809ca4b80220c6 /src/transfersavesdialog.cpp
parentb45b6f3342d3f79c17915e5ac2b19e4fbbb44968 (diff)
Scan for and include script extender save files when transferring saves
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;