mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Revert "A few more instances of non-glib 'open()' getting used without locale-specific input paths"
This reverts commit 52ef02b387.
This commit is contained in:
parent
b2ff1e1734
commit
e3c303d72f
2 changed files with 4 additions and 6 deletions
|
|
@ -61,7 +61,6 @@
|
|||
#undef check /* stupid Apple and their un-namespaced, generic Carbon macros */
|
||||
#endif
|
||||
|
||||
#include <glibmm/convert.h>
|
||||
#include <glibmm/fileutils.h>
|
||||
#include <glibmm/miscutils.h>
|
||||
|
||||
|
|
@ -648,13 +647,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 (Glib::locale_from_utf8 (ARDOUR::translation_enable_path()).c_str(), O_RDONLY);
|
||||
int fd = ::open (ARDOUR::translation_enable_path().c_str(), O_RDONLY);
|
||||
|
||||
if (fd < 0) {
|
||||
return translate_by_default;
|
||||
|
|
@ -676,7 +675,7 @@ bool
|
|||
ARDOUR::set_translations_enabled (bool yn)
|
||||
{
|
||||
string i18n_enabler = ARDOUR::translation_enable_path();
|
||||
int fd = ::open (Glib::locale_from_utf8 (i18n_enabler).c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
int fd = ::open (i18n_enabler.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644);
|
||||
|
||||
if (fd < 0) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
#include <errno.h>
|
||||
#include <regex.h>
|
||||
|
||||
#include <glibmm/convert.h>
|
||||
#include <glibmm/miscutils.h>
|
||||
#include <glibmm/fileutils.h>
|
||||
|
||||
|
|
@ -300,7 +299,7 @@ ARDOUR::cmp_nocase_utf8 (const string& s1, const string& s2)
|
|||
int
|
||||
ARDOUR::touch_file (string path)
|
||||
{
|
||||
int fd = open (Glib::locale_from_utf8 (path).c_str(), O_RDWR|O_CREAT, 0660);
|
||||
int fd = open (path.c_str(), O_RDWR|O_CREAT, 0660);
|
||||
if (fd >= 0) {
|
||||
close (fd);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue