diff options
| author | Dominik Kaiser | 2025-01-20 17:13:37 +0100 |
|---|---|---|
| committer | Dominik Kaiser | 2025-01-20 17:13:37 +0100 |
| commit | f2ffaa70eb299c5e2bb7c181d2910337de7e99d3 (patch) | |
| tree | d53a76c9118206780205d428f353a95d5cac1743 /src/handle_redir.c | |
| parent | 549fabc52ff4d159075f224fb05f5b87f7c5309c (diff) | |
| download | minishell-f2ffaa70eb299c5e2bb7c181d2910337de7e99d3.tar.gz minishell-f2ffaa70eb299c5e2bb7c181d2910337de7e99d3.zip | |
Fix some errors
Diffstat (limited to 'src/handle_redir.c')
| -rw-r--r-- | src/handle_redir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/handle_redir.c b/src/handle_redir.c index 29bba92..03fa453 100644 --- a/src/handle_redir.c +++ b/src/handle_redir.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/01/18 18:34:51 by chuhlig #+# #+# */ -/* Updated: 2025/01/18 18:47:31 by chuhlig ### ########.fr */ +/* Updated: 2025/01/20 15:24:49 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ @@ -26,7 +26,7 @@ int handle_input_redirection(t_redirection *redir) } else if (redir->type == INPUT_LIMITER) { - fd = open_file("/tmp/heredoc_tmp", O_WRONLY | O_CREAT | O_TRUNC, 0644); + fd = open_file("/tmp/heredoc_tmp", O_WRONLY | O_TRUNC, 0644); if (fd < 0) return (-1); write(fd, redir->specifier, ft_strlen(redir->specifier)); @@ -46,7 +46,7 @@ int handle_output_redirection(t_redirection *redir) if (redir->type == OUTPUT_OVERRIDE) { - fd = open_file(redir->specifier, O_WRONLY | O_CREAT | O_TRUNC, 0644); + fd = open_file(redir->specifier, O_WRONLY | O_TRUNC, 0644); if (fd < 0) return (-1); dup2(fd, STDOUT_FILENO); @@ -54,7 +54,7 @@ int handle_output_redirection(t_redirection *redir) } else if (redir->type == OUTPUT_APPEND) { - fd = open_file(redir->specifier, O_WRONLY | O_CREAT | O_APPEND, 0644); + fd = open_file(redir->specifier, O_WRONLY | O_APPEND, 0644); if (fd < 0) return (-1); dup2(fd, STDOUT_FILENO); |
