aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}