This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]