... which messes up the return value, among other things. Why on earth was it calling it to begin with? trap_dos_chdir() does everything that's required.