Commit 41efc137 authored by Max Kellermann's avatar Max Kellermann

fs/Config: swap #if/#else

parent 0f350167
......@@ -37,13 +37,7 @@ ConfigureFS(Error &error)
charset = config_get_string(CONF_FS_CHARSET, nullptr);
if (charset == nullptr) {
#ifndef WIN32
const gchar **encodings;
g_get_filename_charsets(&encodings);
if (encodings[0] != nullptr && *encodings[0] != '\0')
charset = encodings[0];
#else
#ifdef WIN32
/* Glib claims that file system encoding is always utf-8
* on native Win32 (i.e. not Cygwin).
* However this is true only if <gstdio.h> helpers are used.
......@@ -52,6 +46,12 @@ ConfigureFS(Error &error)
static char win_charset[13];
sprintf(win_charset, "cp%u", GetACP());
charset = win_charset;
#else
const gchar **encodings;
g_get_filename_charsets(&encodings);
if (encodings[0] != nullptr && *encodings[0] != '\0')
charset = encodings[0];
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment