aboutsummaryrefslogtreecommitdiffstats
path: root/noice.c
diff options
context:
space:
mode:
authorlostd <lostd@2f30.org>2014-10-23 17:39:39 +0300
committerlostd <lostd@2f30.org>2014-10-23 17:39:39 +0300
commit9407399230577243ee81a28af8d2c2744eb14ea7 (patch)
tree52e3f6a96923c0916de42d12b513b0d49bf1fb73 /noice.c
parent8d4019f3aaae17fad2348e27c2b8dc0880544ce9 (diff)
downloadnoice-9407399230577243ee81a28af8d2c2744eb14ea7.tar.gz
Don't attempt to go back if on the relative root
Diffstat (limited to 'noice.c')
-rw-r--r--noice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/noice.c b/noice.c
index a44388e..c3d3728 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();
Un proyecto texto-plano.xyz