id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4190	"mc-wrapper.sh.in should not (test ""$MC_PWD"" != ""$PWD"")"	mr700		"I am getting
{{{
  shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
}}}
error in the following situation:

1. mkdir recreated
2. cd recreated
3. mc
4. navigate to the parent directory
5. F8 to remove the ""recreated"" directory
6. F7 to recreate the ""recreated"" directory
7. enter the ""recreated"" directory
8. F10 exit Midnight Commander

I think that the check
{{{#!sh
        if test -n ""$MC_PWD"" && test ""$MC_PWD"" != ""$PWD"" && test -d ""$MC_PWD""; then
}}}
should simply be
{{{#!sh
        if test -n ""$MC_PWD"" && test -d ""$MC_PWD""; then
}}}
there is no harm in ""cd $PWD"" if the directory is really the old one and not recreated IMHO. The only behavioral change compared the the previous script is to ""cd -"" will stay in the current directory if it did not change.

Test environment: bash-5.0.17-2.fc33.x86_64 (Fedora 33).
"	defect	new	minor	Future Releases	mc-core	master						no branch	
