1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-22 03:39:45 +02:00

replace boost with qt (fix android crash)

This commit is contained in:
Laserlicht 2024-12-11 00:49:23 +01:00
parent 7cc5c06d2a
commit 922d467d77

View File

@ -129,16 +129,14 @@ void ChroniclesExtractor::createBaseMod() const
for(auto & dataPath : VCMIDirs::get().dataPaths()) 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"; 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); QDir().mkpath(pathToQString(destFolder));
#if BOOST_VERSION >= 107400 QFile::remove(destFile);
boost::filesystem::copy_file(file, destFolder / "portraitsChronicles.json", boost::filesystem::copy_options::overwrite_existing); QFile::copy(file, destFile);
#else
boost::filesystem::copy_file(file, destFolder / "portraitsChronicles.json", boost::filesystem::copy_option::overwrite_if_exists);
#endif
} }
} }
} }