aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-11-02 21:50:26 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-11-02 21:50:26 +0530
commit6713bfba13a05c45c82d537c4bb08a2f4c076faf (patch)
tree06e2a0384f7cc7eac4e14e2749f430787f7c6b23 /src
parentbaaf3ede2a4d48c9310eebbd67ae3398fe82a990 (diff)
downloadnnn-6713bfba13a05c45c82d537c4bb08a2f4c076faf.tar.gz
Fix #373
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index b0623be..1e4017b 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5227,7 +5227,7 @@ static bool setup_config(void)
if (xdg) {
xstrlcpy(cfgdir, xdgcfg, len);
- r = len - 12;
+ r = len - 13; /* subtract length of "/nnn/sessions" */
} else {
r = xstrlcpy(cfgdir, home, len);
@@ -5251,7 +5251,7 @@ static bool setup_config(void)
}
/* Create ~/.config/nnn/plugins */
- xstrlcpy(cfgdir + r + 4 - 1, "/plugins", 9);
+ xstrlcpy(cfgdir + r + 4 - 1, "/plugins", 9); /* subtract length of "/nnn" (4) */
DPRINTF_S(cfgdir);
xstrlcpy(plugindir, cfgdir, len);
@@ -5263,7 +5263,7 @@ static bool setup_config(void)
}
/* Create ~/.config/nnn/sessions */
- xstrlcpy(cfgdir + r + 4 - 1, "/sessions", 10);
+ xstrlcpy(cfgdir + r + 4 - 1, "/sessions", 10); /* subtract length of "/nnn" (4) */
DPRINTF_S(cfgdir);
xstrlcpy(sessiondir, cfgdir, len);