Merge branch 'master' into rendu_minishell

This commit is contained in:
Jack Halford 2017-03-26 18:30:08 +02:00
commit 8bceb99e65

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/06 22:09:53 by jhalford #+# #+# */ /* Created: 2017/02/06 22:09:53 by jhalford #+# #+# */
/* Updated: 2017/03/25 02:25:58 by jhalford ### ########.fr */ /* Updated: 2017/03/26 18:25:38 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -19,7 +19,7 @@ int redirect_less(t_redir *redir)
fdnew = redir->n; fdnew = redir->n;
if ((fdold = open_access(redir->word, F_OK | W_OK, if ((fdold = open_access(redir->word, F_OK | W_OK,
O_RDONLY, 0)) != 0) O_RDONLY, 0)) < 0)
return (ft_perror(NULL)); return (ft_perror(NULL));
dup2(fdold, fdnew); dup2(fdold, fdnew);
return (0); return (0);