From 9407399230577243ee81a28af8d2c2744eb14ea7 Mon Sep 17 00:00:00 2001 From: lostd Date: Thu, 23 Oct 2014 17:39:39 +0300 Subject: [PATCH] Don't attempt to go back if on the relative root --- noice.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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();