about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index dfd34c716..e5fcf5ff8 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1378,7 +1378,11 @@ remtpath(char **junkptr)
     while (str >= *junkptr && !IS_DIRSEP(*str))
 	--str;
     if (str < *junkptr) {
-	*junkptr = dupstring (".");
+	if (IS_DIRSEP(**junkptr))
+	    *junkptr = dupstring ("/");
+	else
+	    *junkptr = dupstring (".");
+
 	return 0;
     }
     /* repeated slashes are considered like a single slash */