From d7a1955f18116b7d7c4f022a09158ca993dd8838 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Thu, 7 Dec 2017 14:04:45 -0600 Subject: Use settings to get correct overwrite path for relative location calc. (Fixes drag & drop from overwrite to mods.) --- src/modlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modlist.cpp b/src/modlist.cpp index 081a5abf..53350c59 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -24,6 +24,7 @@ along with Mod Organizer. If not, see . #include "qtgroupingproxy.h" #include "viewmarkingscrollbar.h" #include "modlistsortproxy.h" +#include "settings.h" #include #include #include @@ -836,7 +837,7 @@ bool ModList::dropURLs(const QMimeData *mimeData, int row, const QModelIndex &pa ModInfo::Ptr modInfo = ModInfo::getByIndex(row); QDir modDirectory(modInfo->absolutePath()); - QDir gameDirectory(qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::overwritePath())); + QDir gameDirectory(Settings::instance().getOverwriteDirectory()); unsigned int overwriteIndex = ModInfo::findMod([] (ModInfo::Ptr mod) -> bool { std::vector flags = mod->getFlags(); -- cgit v1.3.1 From b45b6f3342d3f79c17915e5ac2b19e4fbbb44968 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Thu, 7 Dec 2017 21:53:31 -0600 Subject: Don't set save path or mygamesdirectory in initweaks --- src/profile.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src') diff --git a/src/profile.cpp b/src/profile.cpp index 558d9114..6382a15c 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -221,18 +221,6 @@ void Profile::createTweakedIniFile() error = true; } - if (localSavesEnabled()) { - if (!::WritePrivateProfileStringW(L"General", L"bUseMyGamesDirectory", L"0", ToWString(tweakedIni).c_str())) { - error = true; - } - - if (!::WritePrivateProfileStringW(L"General", L"SLocalSavePath", - AppConfig::localSavePlaceholder(), - ToWString(tweakedIni).c_str())) { - error = true; - } - } - if (error) { reportError(tr("failed to create tweaked ini: %1").arg(getCurrentErrorStringA().c_str())); } -- cgit v1.3.1 From ef21bd6193e6d0bebe356dd3401dafcf064c3aa6 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Fri, 8 Dec 2017 02:42:34 -0600 Subject: Scan for and include script extender save files when transferring saves --- src/transfersavesdialog.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') 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; -- cgit v1.3.1