diff options
author | bubnikv <bubnikv@gmail.com> | 2017-11-02 18:21:34 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-11-02 18:21:34 +0300 |
commit | e8b6d92d4d5852e5731d21afb90362285b2dd6f2 (patch) | |
tree | 11dc25cfe40ed5824629a6f64d701090ff2d4cee /xs/src/libslic3r/utils.cpp | |
parent | 95c284c76431fcd3e21764b206ba6100c3179c1e (diff) |
Looks like the reworked C++ preferences start to work again.
Diffstat (limited to 'xs/src/libslic3r/utils.cpp')
-rw-r--r-- | xs/src/libslic3r/utils.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index e10e136d1..f4c03ef50 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -103,14 +103,14 @@ const std::string& data_dir() std::string config_path(const std::string &file_name) { - auto file = boost::filesystem::canonical(boost::filesystem::path(g_data_dir) / file_name).make_preferred(); + auto file = (boost::filesystem::path(g_data_dir) / file_name).make_preferred(); return file.string(); } std::string config_path(const std::string §ion, const std::string &name) { auto file_name = boost::algorithm::iends_with(name, ".ini") ? name : name + ".ini"; - auto file = boost::filesystem::canonical(boost::filesystem::path(g_data_dir) / file_name).make_preferred(); + auto file = (boost::filesystem::path(g_data_dir) / section / file_name).make_preferred(); return file.string(); } @@ -228,10 +228,9 @@ std::string decode_path(const char *src) #endif /* WIN32 */ } -std::locale locale_utf8(boost::locale::generator().generate("")); - std::string normalize_utf8_nfc(const char *src) { + static std::locale locale_utf8(boost::locale::generator().generate("")); return boost::locale::normalize(src, boost::locale::norm_nfc, locale_utf8); } |