diff options
Diffstat (limited to 'debian/patches/0004-handle-removed-working-dir.patch')
-rw-r--r-- | debian/patches/0004-handle-removed-working-dir.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches/0004-handle-removed-working-dir.patch b/debian/patches/0004-handle-removed-working-dir.patch new file mode 100644 index 0000000..457d242 --- /dev/null +++ b/debian/patches/0004-handle-removed-working-dir.patch @@ -0,0 +1,31 @@ +From: Oliver Kiddle <okiddle@yahoo.co.uk> +Date: Sun, 24 Jun 2012 22:33:38 +0000 +Subject: handle-removed-working-dir + +--- + src/cmd/ksh93/bltins/cd_pwd.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/cmd/ksh93/bltins/cd_pwd.c b/src/cmd/ksh93/bltins/cd_pwd.c +index fb0dcda..d06cfba 100644 +--- a/src/cmd/ksh93/bltins/cd_pwd.c ++++ b/src/cmd/ksh93/bltins/cd_pwd.c +@@ -115,7 +115,18 @@ int b_cd(int argc, char *argv[],Shbltin_t *context) + if(*(dp=dir+1) == '.') + dp++; + if(*dp==0 || *dp=='/') ++ { ++ struct stat statb; ++ if((dp-dir)==2) ++ { ++ sfprintf(shp->strbuf,oldpwd); ++ dp = sfstruse(shp->strbuf); ++ *strrchr(dp,'/')=0; ++ if(*dp) ++ dir = (char*)dp; ++ } + cdpath = 0; ++ } + } + rval = -1; + do |