|
@@ -129,16 +129,14 @@ void ChroniclesExtractor::createBaseMod() const
|
|
|
|
|
|
for(auto & dataPath : VCMIDirs::get().dataPaths())
|
|
|
{
|
|
|
- auto file = dataPath / "config" / "heroes" / "portraitsChronicles.json";
|
|
|
+ auto file = pathToQString(dataPath / "config" / "heroes" / "portraitsChronicles.json");
|
|
|
auto destFolder = VCMIDirs::get().userDataPath() / "Mods" / "chronicles" / "content" / "config";
|
|
|
- if(boost::filesystem::exists(file))
|
|
|
+ auto destFile = pathToQString(destFolder / "portraitsChronicles.json");
|
|
|
+ if(QFile::exists(file))
|
|
|
{
|
|
|
- boost::filesystem::create_directories(destFolder);
|
|
|
-#if BOOST_VERSION >= 107400
|
|
|
- boost::filesystem::copy_file(file, destFolder / "portraitsChronicles.json", boost::filesystem::copy_options::overwrite_existing);
|
|
|
-#else
|
|
|
- boost::filesystem::copy_file(file, destFolder / "portraitsChronicles.json", boost::filesystem::copy_option::overwrite_if_exists);
|
|
|
-#endif
|
|
|
+ QDir().mkpath(pathToQString(destFolder));
|
|
|
+ QFile::remove(destFile);
|
|
|
+ QFile::copy(file, destFile);
|
|
|
}
|
|
|
}
|
|
|
}
|