From: lostd Date: Thu, 23 Oct 2014 14:39:39 +0000 (+0300) Subject: Don't attempt to go back if on the relative root X-Git-Tag: v1.0~92^2~141 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9407399230577243ee81a28af8d2c2744eb14ea7;p=nnn.git Don't attempt to go back if on the relative root --- diff --git a/noice.c b/noice.c index a44388e4..c3d3728f 100644 --- a/noice.c +++ b/noice.c @@ -658,7 +658,9 @@ nochange: return; case SEL_BACK: /* There is no going back */ - if (strcmp(path, "/") == 0) + if (strcmp(path, "/") == 0 || + strcmp(path, ".") == 0 || + strchr(path, '/') == NULL) goto nochange; if (canopendir(path) == 0) { printwarn();