db/Configured: convert path to UTF-8 before injecting into configuration
This commit is contained in:
parent
59dd8ffbc6
commit
a9a6a5041b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user