diff options
author | John Emmas <johne53@tiscali.co.uk> | 2015-07-23 18:27:00 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2015-07-23 18:27:00 +0100 |
commit | 52ef02b387d8267315547129f7f100048a5c1166 (patch) | |
tree | 7f6d3b5d8bb09efe8e9b55ffdf9cd4f698e37dde /libs/ardour/globals.cc | |
parent | a7508a9cf007f52c40b2f86cd17f9b221b3e45e3 (diff) |
A few more instances of non-glib 'open()' getting used without locale-specific input paths
(noticed by Todd. probably more to come...)
Diffstat (limited to 'libs/ardour/globals.cc')
-rw-r--r-- | libs/ardour/globals.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index fa6f833d94..c18d6a9e41 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -61,6 +61,7 @@ #undef check /* stupid Apple and their un-namespaced, generic Carbon macros */ #endif +#include <glibmm/convert.h> #include <glibmm/fileutils.h> #include <glibmm/miscutils.h> @@ -647,13 +648,13 @@ static const bool translate_by_default = true; string ARDOUR::translation_enable_path () { - return Glib::build_filename (user_config_directory(), ".translate"); + return Glib::build_filename (user_config_directory(), ".translate"); } bool ARDOUR::translations_are_enabled () { - int fd = ::open (ARDOUR::translation_enable_path().c_str(), O_RDONLY); + int fd = ::open (Glib::locale_from_utf8 (ARDOUR::translation_enable_path()).c_str(), O_RDONLY); if (fd < 0) { return translate_by_default; @@ -675,7 +676,7 @@ bool ARDOUR::set_translations_enabled (bool yn) { string i18n_enabler = ARDOUR::translation_enable_path(); - int fd = ::open (i18n_enabler.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644); + int fd = ::open (Glib::locale_from_utf8 (i18n_enabler).c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644); if (fd < 0) { return false; |