Blame SOURCES/ksh-20120801-cdfork.patch

1a53a7
--- ksh-20120801/src/cmd/ksh93/sh/path.c	2014-09-01 15:08:06.738969962 -0300
1a53a7
+++ ksh-20120801/src/cmd/ksh93/sh/path.c	2014-09-01 15:13:51.321459978 -0300
1a53a7
@@ -229,13 +229,12 @@ static pid_t path_xargs(Shell_t *shp,con
1a53a7
 /*
1a53a7
  * make sure PWD is set up correctly
1a53a7
  * Return the present working directory
1a53a7
- * Invokes getcwd() if flag==0 and if necessary
1a53a7
+ * Invokes getcwd() if necessary
1a53a7
  * Sets the PWD variable to this value
1a53a7
  */
1a53a7
 char *path_pwd(Shell_t *shp,int flag)
1a53a7
 {
1a53a7
 	register char *cp;
1a53a7
-	register char *dfault = (char*)e_dot;
1a53a7
 	register int count = 0;
1a53a7
 	if(shp->pwd)
1a53a7
 		return((char*)shp->pwd);
1a53a7
@@ -254,11 +253,6 @@ char *path_pwd(Shell_t *shp,int flag)
1a53a7
 				cp = "/";
1a53a7
 				break;
1a53a7
 			case 3:
1a53a7
-				cp = (char*)e_crondir;
1a53a7
-				if(flag) /* skip next case when non-zero flag */
1a53a7
-					++count;
1a53a7
-				break;
1a53a7
-			case 4:
1a53a7
 			{
1a53a7
 				if(cp=getcwd(NIL(char*),0))
1a53a7
 				{  
1a53a7
@@ -269,8 +263,8 @@ char *path_pwd(Shell_t *shp,int flag)
1a53a7
 				}
1a53a7
 				break;
1a53a7
 			}
1a53a7
-			case 5:
1a53a7
+			case 4:
1a53a7
-				return(dfault);
1a53a7
+				return((char*)e_dot);
1a53a7
 		}
1a53a7
 		if(cp && *cp=='/' && test_inode(cp,e_dot))
1a53a7
 			break;