Compare commits
2 Commits
4d3c25547e
...
1b17df6170
Author | SHA1 | Date | |
---|---|---|---|
|
1b17df6170 | ||
|
51d7e60790 |
@ -6,7 +6,7 @@
|
|||||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/02/20 14:27:36 by erey-bet #+# #+# */
|
/* Created: 2023/02/20 14:27:36 by erey-bet #+# #+# */
|
||||||
/* Updated: 2023/03/13 13:26:08 by erey-bet ### ########.fr */
|
/* Updated: 2023/03/13 15:11:07 by erey-bet ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -38,6 +38,11 @@ int move_folder(char **args, int fd)
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
path = args[0];
|
path = args[0];
|
||||||
|
if (!path)
|
||||||
|
{
|
||||||
|
write(2, "No such file or directory\n", 26);
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
if (path[0] == '/' || ft_strncmp(path, "..", ft_strlen(path)) == 0)
|
if (path[0] == '/' || ft_strncmp(path, "..", ft_strlen(path)) == 0)
|
||||||
{
|
{
|
||||||
if (chdir(path) == 0)
|
if (chdir(path) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user