diff options
Diffstat (limited to 'src/create_files.c')
| -rw-r--r-- | src/create_files.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/create_files.c b/src/create_files.c index faee27f..8689f88 100644 --- a/src/create_files.c +++ b/src/create_files.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* create_files.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ +/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/01/16 16:23:51 by dkaiser #+# #+# */ -/* Updated: 2025/01/16 19:16:33 by dkaiser ### ########.fr */ +/* Updated: 2025/01/19 14:36:59 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,10 +22,10 @@ void create_files(t_list *files) { dbg("Test"); if (files->content == NULL) - continue; + continue ; file = (t_redirection *)files->content; if (access(file->specifier, F_OK) != -1 && access(file->specifier, W_OK) == -1) - break; + break ; if (file->type == OUTPUT_OVERRIDE) { fd = open(file->specifier, O_WRONLY | O_CREAT | O_TRUNC, 0644); @@ -36,10 +36,10 @@ void create_files(t_list *files) fd = open(file->specifier, O_WRONLY | O_CREAT | O_APPEND, 0644); close(fd); } - /* if (files->next == NULL) */ - /* break; */ - /* if (((t_redirection *) files->next->content)->type == 0) */ - /* break; */ + if (files->next == NULL) + break ; + if (((t_redirection *) files->next->content)->type == 0) + break ; files = files->next; } } |
