From c42a24327d2cfb362fbefba14da087276cce4c56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Tue, 27 Aug 2024 16:42:42 +0200 Subject: [PATCH] Expand filenames in redirections --- src/execution.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/execution.c b/src/execution.c index ab8e4da..b8db20e 100644 --- a/src/execution.c +++ b/src/execution.c @@ -6,7 +6,7 @@ /* By: lnikolov children, 1)); if (!filename) return (1); + expand_filename(&filename, env); operator = ft_vec_caccess(&io_file->children, 0); if (is_token_type(operator, "LESS")) { @@ -287,7 +306,7 @@ int add_redirection(t_vec *redirections, t_parse_tree_node *redirect, const t_ex subnode = ft_vec_access(&redirect->children, 1); } if (is_token_type(subnode, "io_file")) - return (add_redirection_file(redirections, subnode, fd)); + return (add_redirection_file(redirections, subnode, fd, env)); else return (add_redirection_here(redirections, subnode, fd, env)); } -- 2.30.2