Commit 82ecebb3 authored by Max Kellermann's avatar Max Kellermann

Main: don't require mpd.conf on Android

Don't fail to start if mpd.conf does not exist; just use default values.
parent 6ba0b029
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
#include "android/Environment.hxx" #include "android/Environment.hxx"
#include "android/Context.hxx" #include "android/Context.hxx"
#include "fs/StandardDirectory.hxx" #include "fs/StandardDirectory.hxx"
#include "fs/FileSystem.hxx"
#include "org_musicpd_Bridge.h" #include "org_musicpd_Bridge.h"
#endif #endif
...@@ -448,7 +449,8 @@ int mpd_main(int argc, char *argv[]) ...@@ -448,7 +449,8 @@ int mpd_main(int argc, char *argv[])
if (!sdcard.IsNull()) { if (!sdcard.IsNull()) {
const auto config_path = const auto config_path =
AllocatedPath::Build(sdcard, "mpd.conf"); AllocatedPath::Build(sdcard, "mpd.conf");
if (!ReadConfigFile(config_path, error)) { if (FileExists(config_path) &&
!ReadConfigFile(config_path, error)) {
LogError(error); LogError(error);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment