mirror of
https://github.com/jarun/nnn.git
synced 2025-01-24 01:36:53 +00:00
Create ~/.config if missing
This commit is contained in:
parent
5ea8218e4f
commit
b767d3335c
10
src/nnn.c
10
src/nnn.c
|
@ -4300,10 +4300,18 @@ static bool setup_config(void)
|
|||
return FALSE;
|
||||
}
|
||||
r = xstrlcpy(cfgdir, home, len);
|
||||
xstrlcpy(cfgdir + r - 1, "/.config/nnn", len - r);
|
||||
|
||||
/* Create ~/.config */
|
||||
xstrlcpy(cfgdir + r - 1, "/.config", len - r);
|
||||
DPRINTF_S(cfgdir);
|
||||
if (!create_dir(cfgdir)) {
|
||||
xerror();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Create ~/.config/nnn */
|
||||
xstrlcpy(cfgdir + r - 1, "/.config/nnn", len - r);
|
||||
DPRINTF_S(cfgdir);
|
||||
if (!create_dir(cfgdir)) {
|
||||
xerror();
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue