aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-30 20:34:32 +0100
committerMax Kellermann <max@duempel.org>2014-11-30 20:34:32 +0100
commit41efc1376efe8a137115151109c6874cc1b2b116 (patch)
tree992c4ccfdd3f6716c4868443b8eaeff46860f3ff /src/fs
parent0f35016773354b8aa2de98101e25bbe84e534797 (diff)
downloadmpd-41efc1376efe8a137115151109c6874cc1b2b116.tar.gz
mpd-41efc1376efe8a137115151109c6874cc1b2b116.tar.xz
mpd-41efc1376efe8a137115151109c6874cc1b2b116.zip
fs/Config: swap #if/#else
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/Config.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fs/Config.cxx b/src/fs/Config.cxx
index cb7e86e09..a26699a6d 100644
--- a/src/fs/Config.cxx
+++ b/src/fs/Config.cxx
@@ -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
}