This is the mail archive of the
cygwin
mailing list for the Cygwin project.
[1.7] bug in chdir
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Tue, 14 Jul 2009 21:47:34 +0000 (UTC)
- Subject: [1.7] bug in chdir
$ ls //home
ls: reading directory //home: No such file or directory
$ # makes sense; I don't have a remote machine named home
$ cd //home
$ # huh? no error reported?
$ /bin/pwd # avoid shortcuts in bash builtin; /bin/pwd uses getcwd
//home
$ # huh? getcwd is happy with it?
$ ls
ls: reading directory .: No such file or directory
$ # then how'd we get here?
We should fix chdir() to fail on attempts to go to an impossible virtual
directory. I discovered this because of a bug in dash:
$ dash -c 'CDPATH=/; cd home'
//home
which took me to a non-existent directory, instead of the intended /home.
--
Eric Blake
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple