mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 05:56:01 +01:00
Create data directory only if database is enabled (fixes #158)
This commit is contained in:
parent
931fd9f6cf
commit
bfcffc3e8c
1 changed files with 5 additions and 3 deletions
|
@ -358,6 +358,11 @@ init_database(zathura_t* zathura)
|
||||||
char* database = NULL;
|
char* database = NULL;
|
||||||
girara_setting_get(zathura->ui.session, "database", &database);
|
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) {
|
if (g_strcmp0(database, "plain") == 0) {
|
||||||
girara_debug("Using plain database backend.");
|
girara_debug("Using plain database backend.");
|
||||||
zathura->database = zathura_plaindatabase_new(zathura->config.data_dir);
|
zathura->database = zathura_plaindatabase_new(zathura->config.data_dir);
|
||||||
|
@ -419,9 +424,6 @@ zathura_init(zathura_t* zathura)
|
||||||
/* Set application ID */
|
/* Set application ID */
|
||||||
g_set_prgname("org.pwmt.zathura");
|
g_set_prgname("org.pwmt.zathura");
|
||||||
|
|
||||||
/* create zathura data directory */
|
|
||||||
create_directories(zathura);
|
|
||||||
|
|
||||||
/* load plugins */
|
/* load plugins */
|
||||||
zathura_plugin_manager_load(zathura->plugins.manager);
|
zathura_plugin_manager_load(zathura->plugins.manager);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue