aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2013-12-07 03:46:14 +0600
committerDenis Krjuchkov <denis@crazydev.net>2013-12-08 17:25:19 +0600
commite42637226f7168c17f8eec6806fcd4d5b45289f0 (patch)
tree35270107f77f8cd068691c7f897220f964d90b50
parentae2558217897a816248573c1daec1015cd8fd65d (diff)
downloadmpd-e42637226f7168c17f8eec6806fcd4d5b45289f0.tar.gz
mpd-e42637226f7168c17f8eec6806fcd4d5b45289f0.tar.xz
mpd-e42637226f7168c17f8eec6806fcd4d5b45289f0.zip
Main: use standard directory API
Diffstat (limited to '')
-rw-r--r--src/Main.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 9a70b0015..2d25297c9 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -50,6 +50,7 @@
#include "IOThread.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/Config.hxx"
+#include "fs/StandardDirectory.hxx"
#include "PlaylistRegistry.hxx"
#include "ZeroconfGlue.hxx"
#include "DecoderList.hxx"
@@ -132,13 +133,9 @@ glue_mapper_init(Error &error)
return false;
if (music_dir.IsNull()) {
- const char *path =
- g_get_user_special_dir(G_USER_DIRECTORY_MUSIC);
- if (path != nullptr) {
- music_dir = AllocatedPath::FromUTF8(path, error);
- if (music_dir.IsNull())
- return false;
- }
+ music_dir = GetUserMusicDir();
+ if (music_dir.IsNull())
+ return false;
}
mapper_init(std::move(music_dir), std::move(playlist_dir));