diff options
Diffstat (limited to 'src/p_redirs.c')
-rw-r--r-- | src/p_redirs.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |