From 82ecebb393b09b8689b60465fd0d4ef3f249b719 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jul 2014 10:22:22 +0200 Subject: [PATCH] Main: don't require mpd.conf on Android Don't fail to start if mpd.conf does not exist; just use default values. --- src/Main.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }