diff options
author | Clint Adams <clint@users.sourceforge.net> | 2002-02-06 16:48:28 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2002-02-06 16:48:28 +0000 |
commit | 7dea9669bbdfe2b8cb239189e3b5e8b167e33b5a (patch) | |
tree | a90c94bc99a978de8b4957cd721c8137de20d1fa /Src | |
parent | aa9b40fb5dc8ecd4b32fde782d69ff477cc856d8 (diff) | |
download | zsh-7dea9669bbdfe2b8cb239189e3b5e8b167e33b5a.tar.gz zsh-7dea9669bbdfe2b8cb239189e3b5e8b167e33b5a.tar.xz zsh-7dea9669bbdfe2b8cb239189e3b5e8b167e33b5a.zip |
16577: don't return a single dot as the path head of a slash.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/hist.c | 6 |
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 */ |