diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2021-11-22 18:21:29 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2021-11-22 18:21:29 +0900 |
commit | 138f5bf144589a59ef009f26332652291cd0a944 (patch) | |
tree | 73033f2fc496423f1fb88bf66962871699b25cc7 /Src | |
parent | 973e356c34378d3d81585f83efe1349fc6c58d06 (diff) | |
download | zsh-138f5bf144589a59ef009f26332652291cd0a944.tar.gz zsh-138f5bf144589a59ef009f26332652291cd0a944.tar.xz zsh-138f5bf144589a59ef009f26332652291cd0a944.zip |
49586: fix :a and :A modifiers (with PWD="/") on Cygwin
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 6ac581fda..ea727d1f8 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -1861,7 +1861,11 @@ chabspath(char **junkptr) return 1; if (**junkptr != '/') { - *junkptr = zhtricat(metafy(zgetcwd(), -1, META_HEAPDUP), "/", *junkptr); + char *here = zgetcwd(); + if (here[strlen(here)-1] != '/') + *junkptr = zhtricat(metafy(here, -1, META_HEAPDUP), "/", *junkptr); + else + *junkptr = dyncat(here, *junkptr); } current = *junkptr; |