/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/12 14:52:24 by ljiriste #+# #+# */
-/* Updated: 2023/10/13 13:54:26 by ljiriste ### ########.fr */
+/* Updated: 2023/10/13 15:36:37 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
path = ft_strdup(TEST_DIR);
ft_strncat_alloc(&path, fname, ft_strlen(fname));
fd = open(path, O_RDONLY);
+ free(path);
return (fd);
}
path = ft_strdup(RESULT_DIR);
ft_strncat_alloc(&path, fname, ft_strlen(fname));
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ free(path);
return (fd);
}