From: lostd Date: Thu, 23 Oct 2014 15:38:00 +0000 (+0300) Subject: Revert "No need to manually strip trailing slashes" X-Git-Tag: v1.0~92^2~135 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9a14dcd8d2516e44feaf1a65af4ea8ac76fa33b5;p=nnn.git Revert "No need to manually strip trailing slashes" This reverts commit abd301333da81b72070fbb575dcd0824d3af038e. --- diff --git a/noice.c b/noice.c index 8eeb7d14..81df9075 100644 --- a/noice.c +++ b/noice.c @@ -567,6 +567,13 @@ redraw: /* Clean screen */ erase(); + /* Strip trailing slashes */ + for (i = strlen(path) - 1; i > 0; i--) + if (path[i] == '/') + path[i] = '\0'; + else + break; + DPRINTF_D(cur); DPRINTF_S(path);