From 67994ff4b2bb1a77ba987cf4ac0793ef13190c3a Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 14 Mar 2020 21:44:48 +0530 Subject: Check if file is accessible --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nnn.c b/src/nnn.c index 8f5fa27..26830ed 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5807,7 +5807,7 @@ nochange: rundir[0] = '\0'; } - if (newpath[0]) + if (newpath[0] && !access(newpath, F_OK)) xstrlcpy(lastname, xbasename(newpath), NAME_MAX+1); else if (ndents) copycurname(); -- cgit v1.2.3-70-g09d2