Commit a9a6a504 authored by Max Kellermann's avatar Max Kellermann

db/Configured: convert path to UTF-8 before injecting into configuration

parent 59dd8ffb
......@@ -60,9 +60,12 @@ CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
return nullptr;
const auto db_file = AllocatedPath::Build(cache_dir, "mpd.db");
const auto db_file_utf8 = db_file.ToUTF8();
if (db_file_utf8.empty())
return nullptr;
allocated = new ConfigBlock();
allocated->AddBlockParam("path", db_file.c_str(), -1);
allocated->AddBlockParam("path", db_file_utf8.c_str(), -1);
param = allocated;
}
......
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