This commit is contained in:
Arun Prakash Jana 2020-05-14 12:46:37 +05:30
parent 23770ed049
commit 124666cb38
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 5 additions and 1 deletions

View File

@ -3391,7 +3391,11 @@ static void savecurctx(settings *curcfg, char *path, char *curname, int r /* nex
bool selmode = cfg.selmode ? TRUE : FALSE;
/* Save current context */
xstrsncpy(g_ctx[cfg.curctx].c_name, curname, NAME_MAX + 1);
if (ndents)
xstrsncpy(g_ctx[cfg.curctx].c_name, curname, NAME_MAX + 1);
else
g_ctx[cfg.curctx].c_name[0] = '\0';
g_ctx[cfg.curctx].c_cfg = cfg;
if (ctxr->c_cfg.ctxactive) { /* Switch to saved context */