diff options
author | lostd <lostd@2f30.org> | 2014-10-23 17:39:39 +0300 |
---|---|---|
committer | lostd <lostd@2f30.org> | 2014-10-23 17:39:39 +0300 |
commit | 9407399230577243ee81a28af8d2c2744eb14ea7 (patch) | |
tree | 52e3f6a96923c0916de42d12b513b0d49bf1fb73 | |
parent | 8d4019f3aaae17fad2348e27c2b8dc0880544ce9 (diff) | |
download | nnn-9407399230577243ee81a28af8d2c2744eb14ea7.tar.gz |
Don't attempt to go back if on the relative root
-rw-r--r-- | noice.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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(); |