From a09d38e18272cc8b170649b6758f350dbe4c2645 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Thu, 28 Feb 2019 00:15:25 -0800 Subject: [PATCH] Don't change locale on musl since it would crash --- src/fspp/fuse/Fuse.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fspp/fuse/Fuse.cpp b/src/fspp/fuse/Fuse.cpp index 13d7497b..dc454fcc 100644 --- a/src/fspp/fuse/Fuse.cpp +++ b/src/fspp/fuse/Fuse.cpp @@ -266,8 +266,11 @@ void Fuse::_logUnknownException() { } void Fuse::run(const bf::path &mountdir, const vector &fuseOptions) { +#if defined(__GLIBC__)|| defined(__APPLE__) || defined(_MSC_VER) // Avoid encoding errors for non-utf8 characters, see https://github.com/cryfs/cryfs/issues/247 + // this is ifdef'd out for non-glibc linux, because musl doesn't handle this correctly. bf::path::imbue(std::locale(std::locale(), new std::codecvt_utf8_utf16())); +#endif _mountdir = mountdir;