aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index d1b64bc..9732c0f 100644
--- a/src/nnn.c
+++ b/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;