fix: add '\n' pwd
This commit is contained in:
parent
255892e12e
commit
a20fa2a4c6
@ -6,7 +6,7 @@
|
|||||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/02/17 16:09:11 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];
|
char path[PATH_MAX];
|
||||||
|
|
||||||
if (getcwd(path, sizeof(path)) != NULL)
|
if (getcwd(path, sizeof(path)) != NULL)
|
||||||
ft_putstr_fd(path, fd);
|
ft_putendl_fd(path, fd);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ft_putstr_fd("Error getcwd", fd);
|
ft_putendl_fd("Error getcwd", fd);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
@ -35,7 +35,7 @@ char *get_pwd(int fd)
|
|||||||
return (str);
|
return (str);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ft_putstr_fd("Error getcwd", fd);
|
ft_putendl_fd("Error getcwd", fd);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user