mirror of
https://git.sr.ht/~sircmpwn/gmni
synced 2024-11-23 04:51:59 +01:00
gmnlm: open_bookmarks: call mkdirs
This commit is contained in:
parent
4b7fba261a
commit
a5eae7ea6b
@ -187,6 +187,15 @@ open_bookmarks(struct browser *browser)
|
||||
{
|
||||
char *path_fmt = get_data_pathfmt();
|
||||
static char path[PATH_MAX+1];
|
||||
snprintf(path, sizeof(path), path_fmt, "bookmarks.gmi");
|
||||
if (mkdirs(dirname(path), 0755) != 0) {
|
||||
snprintf(path, sizeof(path), path_fmt, "bookmarks.gmi");
|
||||
free(path_fmt);
|
||||
fprintf(stderr, "Error creating directory %s: %s\n",
|
||||
dirname(path), strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf(path, sizeof(path), path_fmt, "bookmarks.gmi");
|
||||
free(path_fmt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user