faboussard / 42_minishell

1 stars 0 forks source link

CD : MAJ : revoir les chemins car si sgoinfre et cd ../../, va direct a la racine car chemin incomplet via goinfre/sgoinfre #71

Closed melobern closed 5 months ago

melobern commented 6 months ago

Statut : :ok: CD fait du surplace.

>>>  Minishell>$ ls
ignore_leaks.supp  info.txt  Makefile   questions  sujet_correction.pdf
includes       libft     minishell  srcs       tests.txt
>>>  Minishell>$ cd
m->target_path = /home/melodie/
>>>  Minishell>$ ls
ignore_leaks.supp  info.txt  Makefile   questions  sujet_correction.pdf
includes       libft     minishell  srcs       tests.txt
>>>  Minishell>$ pwd
/home/melodie/42_minishell.c
>>>  Minishell>$ cd ..
>>>  Minishell>$ ls
ignore_leaks.supp  info.txt  Makefile   questions  sujet_correction.pdf
includes       libft     minishell  srcs       tests.txt
>>>  Minishell>$ pwd
/home/melodie/42_minishell.c
melobern commented 6 months ago

Statut : :ok:

SHELL:~/Documents$ mkdir cou
SHELL:~/Documents$ cd cou
SHELL:~/Documents/cou$ rmdir ../cou
SHELL:~/Documents/cou$ cd ../cou
bash: cd: ../cou: No such file or directory
SHELL:~/Documents/cou$ cd .
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
SHELL:~/Documents/cou/.$ cd ..
SHELL:~/Documents$

Statut : :interrobang:

SHELL:~/sgoinfre/42_minishell.c/test/test$ cd ..
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
bash: cd: ..: Stale file handle
SHELL:~/sgoinfre/42_minishell.c/test/test$ cd ../..
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
bash: cd: ../..: Stale file handle
SHELL:~/sgoinfre/42_minishell.c/test/test$ cd ../../../
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
bash: cd: ../../../: Stale file handle

Statut : :ok: Retoucher cd . pour les dossiers supprimés / ayant perdu leur permission.

Statut : :ok: Et en cas de suppression du dossier : cd . mbernard@z4r9p5:~/Documents/coucou$ cd . cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

melobern commented 6 months ago

Statut : :ok:

Problème

CD bouge de nouveau mais segfault dont je devrais m'occuper.

melobern commented 6 months ago

Statut : :ok: Statut renvoyé si dossier supprimé : -1. Bash renvoie 0 comme code de sortie :warning:

melobern commented 5 months ago

Statut : :construction:

../ ../../ ../../../ ne fonctionnent pas correctement

>>>  Minishell>$ cd ../
tmp = /home/mbernard/Documents/
>>>  Minishell>$ pwd
/home/mbernard/Documents/
>>>  Minishell>$ cd ../
tmp = /home/mbernard/Documents/
>>>  Minishell>$ pwd
/home/mbernard/Documents/
>>>  Minishell>$ cd ../../
tmp = /home/mbernard/Documents/
minishell: cd: ../../: No such file or directory