bugfix linux & macos build

This commit is contained in:
supermerill 2020-01-10 17:49:07 +01:00
parent 71ba7a0367
commit 6141527694

View File

@ -1097,6 +1097,7 @@ size_t PresetBundle::load_configbundle(const std::string &path, unsigned int fla
namespace pt = boost::property_tree;
pt::ptree tree;
boost::nowide::ifstream ifs(path);
#ifdef __WXMSW__
try {
pt::read_ini(ifs, tree);
}catch(const std::exception& ex) {
@ -1104,6 +1105,9 @@ size_t PresetBundle::load_configbundle(const std::string &path, unsigned int fla
ss << "Error when reading bundle file " << path << ", error: " << ex.what();
throw std::exception(ss.str().c_str());
}
#else
pt::read_ini(ifs, tree);
#endif
const VendorProfile *vendor_profile = nullptr;
if (flags & (LOAD_CFGBNDLE_SYSTEM | LOAD_CFGBUNDLE_VENDOR_ONLY)) {
auto vp = VendorProfile::from_ini(tree, path);