Main: initialize Database before Storage
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
Database *
|
||||
CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
|
||||
bool have_storage, bool &is_simple_r, Error &error)
|
||||
bool &is_simple_r, Error &error)
|
||||
{
|
||||
const struct config_param *param = config_get_param(CONF_DATABASE);
|
||||
const struct config_param *path = config_get_param(CONF_DB_FILE);
|
||||
@@ -40,18 +40,6 @@ CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!have_storage) {
|
||||
if (param != nullptr)
|
||||
LogDefault(config_domain,
|
||||
"Found database setting without "
|
||||
"music_directory - disabling database");
|
||||
if (path != nullptr)
|
||||
LogDefault(config_domain,
|
||||
"Found db_file setting without "
|
||||
"music_directory - disabling database");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
struct config_param *allocated = nullptr;
|
||||
|
||||
if (param == nullptr && path != nullptr) {
|
||||
|
@@ -34,6 +34,6 @@ class Error;
|
||||
*/
|
||||
Database *
|
||||
CreateConfiguredDatabase(EventLoop &loop, DatabaseListener &listener,
|
||||
bool have_storage, bool &is_simple_r, Error &error);
|
||||
bool &is_simple_r, Error &error);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user