Commit bfcffc3e authored by Sebastian Ramacher's avatar Sebastian Ramacher

Create data directory only if database is enabled (fixes #158)

parent 931fd9f6
Pipeline #270 passed with stages
in 1 minute and 50 seconds
......@@ -358,6 +358,11 @@ init_database(zathura_t* zathura)
char* database = NULL;
girara_setting_get(zathura->ui.session, "database", &database);
/* create zathura data directory if database enabled */
if (g_strcmp0(database, "null") != 0) {
create_directories(zathura);
}
if (g_strcmp0(database, "plain") == 0) {
girara_debug("Using plain database backend.");
zathura->database = zathura_plaindatabase_new(zathura->config.data_dir);
......@@ -419,9 +424,6 @@ zathura_init(zathura_t* zathura)
/* Set application ID */
g_set_prgname("org.pwmt.zathura");
/* create zathura data directory */
create_directories(zathura);
/* load plugins */
zathura_plugin_manager_load(zathura->plugins.manager);
......
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