diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-05-27 18:55:05 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-05-27 18:55:05 +0530 |
commit | b767d3335c8a624867dcd69bf41c3e522608c0d8 (patch) | |
tree | 207dcf8180daf5e6cd62edb162148c6710b602c0 /src/nnn.c | |
parent | 5ea8218e4f85336f092fefe077af21673ed6beb5 (diff) | |
download | nnn-b767d3335c8a624867dcd69bf41c3e522608c0d8.tar.gz |
Create ~/.config if missing
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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; |