]> Sergey Matveev's repositories - nnn.git/commitdiff
Revert "No need to manually strip trailing slashes"
authorlostd <lostd@2f30.org>
Thu, 23 Oct 2014 15:38:00 +0000 (18:38 +0300)
committerlostd <lostd@2f30.org>
Thu, 23 Oct 2014 15:38:00 +0000 (18:38 +0300)
This reverts commit abd301333da81b72070fbb575dcd0824d3af038e.

noice.c

diff --git a/noice.c b/noice.c
index 8eeb7d14cb5e0494b928527f9108b98eb7755055..81df90752affe549dcdb038ea7992ea1f73b8f1e 100644 (file)
--- 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);