about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/prompt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/prompt.c b/Src/prompt.c
index 56d6a76fd..3b16a8e44 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -244,9 +244,12 @@ putpromptchar(int doprint, int endchar)
 		    if ((nd = finddir(ss))) {
 			arg--;
 			ss += strlen(nd->dir);
-		    }
+		    } /*FALLTHROUGH*/
 		case '/':
 		case 'C':
+		    /* `/' gives 0, `/any' gives 1, etc. */
+		    if (*ss++ == '/' && *ss)
+			arg--;
 		    for (; *ss; ss++)
 			if (*ss == '/')
 			    arg--;