aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Configured.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/db/Configured.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/db/Configured.cxx b/src/db/Configured.cxx
index 9ada7f34a..5d95b3e70 100644
--- a/src/db/Configured.cxx
+++ b/src/db/Configured.cxx
@@ -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;
}