Commit ac88923e authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Print error message if directory creation failed

parent f82845a0
......@@ -3,6 +3,7 @@
#define _BSD_SOURCE
#define _XOPEN_SOURCE 700
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
......@@ -95,8 +96,13 @@ zathura_init(zathura_t* zathura)
}
/* create zathura (config/data) directory */
g_mkdir_with_parents(zathura->config.config_dir, 0771);
g_mkdir_with_parents(zathura->config.data_dir, 0771);
if (g_mkdir_with_parents(zathura->config.config_dir, 0771) == -1) {
girara_error("Could not create '%s': %s", zathura->config.config_dir, strerror(errno));
}
if (g_mkdir_with_parents(zathura->config.data_dir, 0771) == -1) {
girara_error("Could not create '%s': %s", zathura->config.data_dir, strerror(errno));
}
/* load plugins */
zathura_plugin_manager_load(zathura->plugins.manager);
......
Supports Markdown
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