aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--noice.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/noice.c b/noice.c
index 8eeb7d1..81df907 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);