From 4d5ebafa6dd1ed5d40e5e7f6b86aae1d828341cf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Feb 2014 23:29:20 +0100 Subject: Main: check the music directory Move call from Mapper.cxx. --- src/Main.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Main.cxx') diff --git a/src/Main.cxx b/src/Main.cxx index b7f914cdb..7a2789b0c 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -46,6 +46,7 @@ #include "fs/AllocatedPath.hxx" #include "fs/Config.hxx" #include "fs/StandardDirectory.hxx" +#include "fs/CheckFile.hxx" #include "playlist/PlaylistRegistry.hxx" #include "zeroconf/ZeroconfGlue.hxx" #include "decoder/DecoderList.hxx" @@ -145,8 +146,10 @@ glue_mapper_init(Error &error) if (music_dir.IsNull()) music_dir = GetUserMusicDir(); - if (!music_dir.IsNull()) + if (!music_dir.IsNull()) { music_dir.ChopSeparators(); + CheckDirectoryReadable(music_dir); + } #ifdef ENABLE_DATABASE if (!music_dir.IsNull()) { -- cgit v1.2.3