From: Lukáš Jiřiště Date: Tue, 27 Aug 2024 14:42:42 +0000 (+0200) Subject: Expand filenames in redirections X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=c42a24327d2cfb362fbefba14da087276cce4c56;p=42%2Fminishell.git Expand filenames in redirections --- 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)); }