diff options
author | Max Kellermann <max@duempel.org> | 2014-11-29 22:33:30 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-29 23:36:44 +0100 |
commit | fd2c6b8a4b059bd810ca8511fa8f66001843284c (patch) | |
tree | 3244bbfa951be5bb79094067c0f816e6c84f7f12 /src/fs/Config.cxx | |
parent | 5b1db917bc63fcacfc503ebc02251a2905bc2f8f (diff) | |
download | mpd-fd2c6b8a4b059bd810ca8511fa8f66001843284c.tar.gz mpd-fd2c6b8a4b059bd810ca8511fa8f66001843284c.tar.xz mpd-fd2c6b8a4b059bd810ca8511fa8f66001843284c.zip |
fs/Charset: return Error on SetFSCharset() failure
Don't abort the process, let the caller decide instead.
Diffstat (limited to 'src/fs/Config.cxx')
-rw-r--r-- | src/fs/Config.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fs/Config.cxx b/src/fs/Config.cxx index 0034ecc61..cf789fcb7 100644 --- a/src/fs/Config.cxx +++ b/src/fs/Config.cxx @@ -29,8 +29,8 @@ #include <glib.h> #endif -void -ConfigureFS() +bool +ConfigureFS(Error &error) { #ifdef HAVE_GLIB const char *charset = nullptr; @@ -55,7 +55,9 @@ ConfigureFS() #endif } - if (charset != nullptr) - SetFSCharset(charset); + return charset == nullptr || SetFSCharset(charset, error); +#else + (void)error; + return true; #endif } |