mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 05:02:24 -04:00
Fix startup crash when using a locale boost does not like
There are various locale related bugs in various versions of boost, where exceptions are thrown in boost::filesystem APIs when the current locale is not to boost's liking. It's not clear what "not to boost's liking" means in detail, though "en" and "en_US.UTF-8" are not to its liking. Fix it by running a test function that's known to throw in such a case, and resetting LANG and LC_ALL to C if an exception is thrown. In simplewallet, the locale is queried before that so the correct translations will still be used.
This commit is contained in:
parent
0c1dae32b4
commit
f3724aef88
7 changed files with 33 additions and 1 deletions
|
@ -88,6 +88,8 @@ namespace tools
|
|||
*/
|
||||
std::error_code replace_file(const std::string& replacement_name, const std::string& replaced_name);
|
||||
|
||||
bool sanitize_locale();
|
||||
|
||||
inline crypto::hash get_proof_of_trust_hash(const nodetool::proof_of_trust& pot)
|
||||
{
|
||||
std::string s;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue