From a20fa2a4c6091430248268b93ebe3ad5682be899 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Tue, 21 Feb 2023 15:12:26 +0100 Subject: [PATCH] fix: add '\n' pwd --- builtins/pwd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtins/pwd.c b/builtins/pwd.c index 65d3f00..aa7f39c 100644 --- a/builtins/pwd.c +++ b/builtins/pwd.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/02/17 16:09:11 by erey-bet #+# #+# */ -/* Updated: 2023/02/21 14:34:50 by erey-bet ### ########.fr */ +/* Updated: 2023/02/21 15:11:38 by cchauvet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,10 +17,10 @@ int pwd(int fd) char path[PATH_MAX]; if (getcwd(path, sizeof(path)) != NULL) - ft_putstr_fd(path, fd); + ft_putendl_fd(path, fd); else { - ft_putstr_fd("Error getcwd", fd); + ft_putendl_fd("Error getcwd", fd); return (1); } return (0); @@ -35,7 +35,7 @@ char *get_pwd(int fd) return (str); else { - ft_putstr_fd("Error getcwd", fd); + ft_putendl_fd("Error getcwd", fd); return (NULL); } }