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:
parent
7cc5c06d2a
commit
922d467d77
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user