diff options
Diffstat (limited to '')
| -rw-r--r-- | src/b_cd.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| @@ -83,7 +83,7 @@ static void  		}  		else  		{ -			j = ft_strlen(repath) + 1; +			j = (ft_strncmp(repath, "/", 2) == 0) ? (1) : (ft_strlen(repath) + 1);  			repath[j - 1] = '/';  			ft_strlcpy(repath + j, splited[i], ft_strlen(splited[i]) + 1);  		} @@ -113,7 +113,6 @@ static void  		ft_delwords(splited);  	}  	repath[0] = (repath[0] == '\0') ? '/' : repath[0]; -	ft_printf("[%s]\n", repath);  	ft_sprintf(fmt, "%s=%s", "PWD", repath);  	b_export_with_equals(fmt, msh);  	ft_memdel((void*)&msh->cwd); @@ -137,7 +136,8 @@ uint8_t  	{  		if ((path = u_get_var_value("$HOME", msh)) == NULL)  		{ -			ft_dprintf(STDERR_FILENO, "minishell: cd: %s\n", FT_FAIL_HOME_NOT_SET); +			ft_dprintf(STDERR_FILENO, "minishell: cd: %s\n", +				FT_FAIL_HOME_NOT_SET);  			return (2);  		}  	} | 
