aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-12 10:02:11 +0200
committerMax Kellermann <max@duempel.org>2013-09-12 10:17:41 +0200
commit1ee6a78cb727561e75a5d60135bb0cd7956f70b0 (patch)
tree1b04fc472927341f818d3d571456fb495dd43ece /src/Main.cxx
parentbf4ee48efad262c650b6b1a5b61ebe837d59f910 (diff)
downloadmpd-1ee6a78cb727561e75a5d60135bb0cd7956f70b0.tar.gz
mpd-1ee6a78cb727561e75a5d60135bb0cd7956f70b0.tar.xz
mpd-1ee6a78cb727561e75a5d60135bb0cd7956f70b0.zip
Path: add FromUTF8() overload that returns an Error
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index a1138a908..80c6b0069 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -138,8 +138,12 @@ glue_mapper_init(Error &error)
if (playlist_dir.IsNull() && error.IsDefined())
return false;
- if (music_dir.IsNull())
- music_dir = Path::FromUTF8(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC));
+ if (music_dir.IsNull()) {
+ music_dir = Path::FromUTF8(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC),
+ error);
+ if (music_dir.IsNull())
+ return false;
+ }
mapper_init(std::move(music_dir), std::move(playlist_dir));
return true;