aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-07-30 10:22:22 +0200
committerMax Kellermann <max@duempel.org>2014-07-30 10:22:22 +0200
commit82ecebb393b09b8689b60465fd0d4ef3f249b719 (patch)
treeab9054bfc2da063c57974b8eb8190be64113c7d4 /src
parent6ba0b029e666212bea619a73153c146ab9f19c15 (diff)
downloadmpd-82ecebb393b09b8689b60465fd0d4ef3f249b719.tar.gz
mpd-82ecebb393b09b8689b60465fd0d4ef3f249b719.tar.xz
mpd-82ecebb393b09b8689b60465fd0d4ef3f249b719.zip
Main: don't require mpd.conf on Android
Don't fail to start if mpd.conf does not exist; just use default values.
Diffstat (limited to 'src')
-rw-r--r--src/Main.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index e914d876c..2ce81bc3e 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -95,6 +95,7 @@
#include "android/Environment.hxx"
#include "android/Context.hxx"
#include "fs/StandardDirectory.hxx"
+#include "fs/FileSystem.hxx"
#include "org_musicpd_Bridge.h"
#endif
@@ -448,7 +449,8 @@ int mpd_main(int argc, char *argv[])
if (!sdcard.IsNull()) {
const auto config_path =
AllocatedPath::Build(sdcard, "mpd.conf");
- if (!ReadConfigFile(config_path, error)) {
+ if (FileExists(config_path) &&
+ !ReadConfigFile(config_path, error)) {
LogError(error);
return EXIT_FAILURE;
}