diff --git a/src/Main.cxx b/src/Main.cxx index aec0597ba..6a29de7e0 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -547,7 +547,7 @@ try { static int mpd_main_after_fork(const ConfigData &raw_config, const Config &config) try { - ConfigureFS(); + ConfigureFS(raw_config); glue_mapper_init(raw_config); diff --git a/src/fs/Config.cxx b/src/fs/Config.cxx index 9d51da47e..140e3becd 100644 --- a/src/fs/Config.cxx +++ b/src/fs/Config.cxx @@ -20,15 +20,17 @@ #include "config.h" #include "Config.hxx" #include "Charset.hxx" -#include "config/Global.hxx" +#include "config/Data.hxx" void -ConfigureFS() +ConfigureFS(const ConfigData &config) { #ifdef HAVE_FS_CHARSET - const char *charset = config_get_string(ConfigOption::FS_CHARSET); + const char *charset = config.GetString(ConfigOption::FS_CHARSET); if (charset != nullptr) SetFSCharset(charset); +#else + (void)config; #endif } diff --git a/src/fs/Config.hxx b/src/fs/Config.hxx index cd03e0ff7..fdc7453a6 100644 --- a/src/fs/Config.hxx +++ b/src/fs/Config.hxx @@ -22,13 +22,15 @@ #include "check.h" +struct ConfigData; + /** * Performs global one-time initialization of this class. * * Throws std::runtime_error on error. */ void -ConfigureFS(); +ConfigureFS(const ConfigData &config); void DeinitFS();