mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 20:16:54 +03:00
ensure new config directories can be created.
This commit is contained in:
parent
07e4924254
commit
a4be7f7d1a
@ -1060,7 +1060,7 @@ static nserror get_config_home(char **config_home_out)
|
|||||||
|
|
||||||
static nserror create_config_home(char **config_home_out)
|
static nserror create_config_home(char **config_home_out)
|
||||||
{
|
{
|
||||||
char *config_home;
|
char *config_home = NULL;
|
||||||
char *home_dir;
|
char *home_dir;
|
||||||
char *xdg_config_dir;
|
char *xdg_config_dir;
|
||||||
nserror ret;
|
nserror ret;
|
||||||
@ -1080,12 +1080,12 @@ static nserror create_config_home(char **config_home_out)
|
|||||||
return NSERROR_NOT_DIRECTORY;
|
return NSERROR_NOT_DIRECTORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = netsurf_mkpath(&config_home, NULL, 2, home_dir, ".config/netsurf/");
|
ret = netsurf_mkpath(&config_home, NULL, 4, home_dir, ".config","netsurf", "/");
|
||||||
if (ret != NSERROR_OK) {
|
if (ret != NSERROR_OK) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = netsurf_mkpath(&config_home, NULL, 2, xdg_config_dir, "netsurf/");
|
ret = netsurf_mkpath(&config_home, NULL, 3, xdg_config_dir, "netsurf", "/");
|
||||||
if (ret != NSERROR_OK) {
|
if (ret != NSERROR_OK) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user