Main: don't require mpd.conf on Android

Don't fail to start if mpd.conf does not exist; just use default
values.
This commit is contained in:
Max Kellermann 2014-07-30 10:22:22 +02:00
parent 6ba0b029e6
commit 82ecebb393

View File

@ -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;
}