aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 23:13:24 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 23:13:24 +0100
commitc45f205593a9ba49e8484584a7d61fc7d10a4569 (patch)
tree5ee2855cc0f8fff6132b51119b3ceba500d083bd
parent027b2063ba450e1d0049907f9c5f22abcc1236ac (diff)
downloadmpd-c45f205593a9ba49e8484584a7d61fc7d10a4569.tar.gz
mpd-c45f205593a9ba49e8484584a7d61fc7d10a4569.tar.xz
mpd-c45f205593a9ba49e8484584a7d61fc7d10a4569.zip
Main: chop separators from music directory
Move call from Mapper.cxx.
Diffstat (limited to '')
-rw-r--r--src/Main.cxx3
-rw-r--r--src/Mapper.cxx1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 22e71195a..b7f914cdb 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -145,6 +145,9 @@ glue_mapper_init(Error &error)
if (music_dir.IsNull())
music_dir = GetUserMusicDir();
+ if (!music_dir.IsNull())
+ music_dir.ChopSeparators();
+
#ifdef ENABLE_DATABASE
if (!music_dir.IsNull()) {
const auto music_dir_utf8 = music_dir.ToUTF8();
diff --git a/src/Mapper.cxx b/src/Mapper.cxx
index fc5a9cfe0..e6d7c3900 100644
--- a/src/Mapper.cxx
+++ b/src/Mapper.cxx
@@ -92,7 +92,6 @@ mapper_set_music_dir(AllocatedPath &&path)
assert(!path.IsNull());
music_dir_fs = std::move(path);
- music_dir_fs.ChopSeparators();
const auto music_dir_utf8 = music_dir_fs.ToUTF8();