Commit 8cf3ac20 authored by Max Kellermann's avatar Max Kellermann

Main: use getExternalStorageDirectory() for locating mpd.conf

parent 47787740
......@@ -430,8 +430,17 @@ int mpd_main(int argc, char *argv[])
(void)argc;
(void)argv;
if (!ReadConfigFile(Path::FromFS("/sdcard/mpd.conf"), error))
{
const auto sdcard = Environment::getExternalStorageDirectory();
if (!sdcard.IsNull()) {
const auto config_path =
AllocatedPath::Build(sdcard, "mpd.conf");
if (!ReadConfigFile(config_path, error)) {
LogError(error);
return EXIT_FAILURE;
}
}
}
#else
if (!parse_cmdline(argc, argv, &options, error)) {
LogError(error);
......
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