nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 03a81aa9c5c96aca04eaf2ac77678d512a732bd2
parent 4957c1121d0f700155b591536bcfb01359c78492
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun,  3 Jul 2016 16:18:26 +0200

browser: trim all trailing slashes (just in case there are more)

Diffstat:
Msrc/browser.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -271,8 +271,8 @@ char *do_browser(char *path) continue; } #endif - /* Snip a trailing slash, so the name can be compared. */ - if (strlen(newpath) > 1 && newpath[strlen(newpath) - 1] == '/') + /* Snip any trailing slashes, so the name can be compared. */ + while (strlen(newpath) > 1 && newpath[strlen(newpath) - 1] == '/') newpath[strlen(newpath) - 1] = '\0'; /* In case the specified directory cannot be entered, select it