added put_error_cd2 in put_error_cd.c

This commit is contained in:
Tanguy Maze
2020-01-30 11:03:30 +01:00
parent de2a6e77d7
commit cd72d29c63
4 changed files with 16 additions and 18 deletions

View File

@@ -104,6 +104,12 @@ char **res_ext(char **av, t_env *env)
else if (av[i[0]][i[1]] == '~' && (tmp = ft_envgetelem("HOME", env))
!= NULL && (ret = replace_env(av[i[0]], tmp, 1, i[1])) != NULL)
ft_strreplace(&av[i[0]], ret, &i[1], tmp);
else if (av[i[0]][i[1]] == '~' && (tmp = ft_envgetelem("HOME", env))
== NULL)
{
ft_printf("Entry %s not found\n", "HOME");
return (NULL);
}
else if (av[i[0]][i[1]] == '$'
&& resolve_complete_key(&av[i[0]], &i[1], env) == NULL)
return (NULL);