Vérification de toute la commande pour cd

This commit is contained in:
rick 2021-02-20 16:55:30 +01:00
parent 05f62dfc6e
commit 831f45b662
Signed by: Rick
GPG Key ID: 2B593F087240EE99
1 changed files with 2 additions and 1 deletions

View File

@ -61,8 +61,9 @@ void error(int code, int type, char *message)
int native_command(char *command[])
{
int ret = 1; /* 0 si commande non native */
if (!strncmp(command[0], "cd", 2))
if (!strcmp(command[0], "cd"))
change_dir(command[1]);
else
ret = 0;
return ret;