From ca88bc609950ebe3f84b4a5cadeb069fc3aded14 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 22 Oct 2020 18:49:41 +0200 Subject: Unfinished --- src/p_redirs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/p_redirs.c') diff --git a/src/p_redirs.c b/src/p_redirs.c index 6297255..108a2a3 100644 --- a/src/p_redirs.c +++ b/src/p_redirs.c @@ -44,6 +44,7 @@ static void p_append_redir(const char path[], new = s_lredir_new(path, fd, redir); if (new == NULL) { + /* TODO: return (1) and abort command right here */ return ; } new->heredoc = NULL; @@ -64,7 +65,7 @@ static size_t p_get_path(char path[], size_t len; hlen = 0; - tmp.ptr += ft_abs(tmp.redir); + tmp.ptr += (tmp.redir == 3) ? (2) : (ft_abs(tmp.redir)); while (*tmp.ptr != C_NUL && ft_iswhitespace(*tmp.ptr) == TRUE) tmp.ptr++; if (*tmp.ptr == C_TILDE && u_get_var_value(h, "$HOME", PATH_MAX, msh) == 0) -- cgit v1.2.3