nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1235a7a9a114c57e91905c0f1d06f75e3f76f07f
parent 6c141d1bb49357304449d23599ef65664c94b5b9
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 11 Jan 2019 08:06:16 +0530

Fix #188

Diffstat:
Msrc/nnn.c | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -3045,7 +3045,8 @@ nochange: case SEL_HELP: // fallthrough case SEL_LOCK: { - mkpath(path, dents[cur].name, newpath, PATH_MAX); + if (ndents) + mkpath(path, dents[cur].name, newpath, PATH_MAX); switch (sel) { case SEL_MEDIA: @@ -3097,7 +3098,8 @@ nochange: presel = FILTER; /* Save current */ - copycurname(); + if (ndents) + copycurname(); /* Repopulate as directory content may have changed */ goto begin; @@ -3251,7 +3253,8 @@ nochange: spawn("sh", "-c", g_buf, path, F_NORMAL | F_SIGINT); - copycurname(); + if (ndents) + copycurname(); if (cfg.filtermode) presel = FILTER; goto begin;