diff --git a/Data Files/Changelog.txt b/Data Files/Changelog.txt index 2a15bb4be..869cda854 100644 --- a/Data Files/Changelog.txt +++ b/Data Files/Changelog.txt @@ -519,4 +519,5 @@ Revision Log Message 494 Update test scripts 495 Give cores on absorbed vassals 496 Update converter mod -497 Merge minor to main \ No newline at end of file +497 Merge minor to main +498 Put saves in the correct places \ No newline at end of file diff --git a/Source/Convert.cpp b/Source/Convert.cpp index 4dc86bfc8..985080e6c 100644 --- a/Source/Convert.cpp +++ b/Source/Convert.cpp @@ -100,12 +100,13 @@ int main(int argc, char * argv[]) //Copy mod folder + string modFolderName; if (Configuration::getUseConverterMod() == "yes") { - string modFolderName; if (argc >= 2) { modFolderName = inputFilename.substr(0, inputFilename.find_last_of('.')); + modFolderName = modFolderName.substr(modFolderName.find_last_of('\\') + 1, modFolderName.length()); } else { @@ -642,11 +643,11 @@ int main(int argc, char * argv[]) string outputFilename = ""; if (Configuration::getUseConverterMod() == "yes") { - outputFilename += Configuration::getModPath() + "\\Converter\\save games\\"; + outputFilename = modFolderName + "\\Converter\\save games\\"; if (argc >= 2) { string filename = inputFilename.substr(0, inputFilename.find_last_of('.')); - filename = filename.substr(filename.find_last_of('\\'), filename.length()); + filename = filename.substr(filename.find_last_of('\\') + 1, filename.length()); outputFilename += filename + ".eu3"; } else @@ -658,8 +659,9 @@ int main(int argc, char * argv[]) { if (argc >= 2) { - outputFilename += inputFilename.substr(0, inputFilename.find_last_of('.')); - outputFilename += ".eu3"; + string filename = inputFilename.substr(0, inputFilename.find_last_of('.')); + filename = filename.substr(filename.find_last_of('\\') + 1, filename.length()); + outputFilename += filename + ".eu3"; } else {