This is the mail archive of the
mailing list for the Cygwin project.
Re: [ -d ' ' ] && echo yes
- From: "Elfyn McBratney" <elfyn-cygwin at exposure dot org dot uk>
- To: "cygwin" <cygwin at cygwin dot com>,"Norton Allen" <allen at huarp dot harvard dot edu>
- Date: Mon, 3 Feb 2003 22:36:35 -0000
- Subject: Re: [ -d ' ' ] && echo yes
- References: <200302032241.RAA19340@bottesini.harvard.edu>
> FWIW, I've just tested on Linux (of some flavor) and OpenBSD,
> and neither thinks ' ' is a directory.
> In any event, I'd like to figure out whether it's a bug or
> a feature under Cygwin so I can move forward.
Sorry, it is my head then :/
It may just be a Cygwin geature, and by looking at the strace output
293 1191913 [main] ls 2188 fhandler_base::fstat: here
99 1192012 [main] ls 2188 fstat64: 0 = fstat (1, 0x241FCA8)
298 1192310 [main] ls 2188 writev: writev (1, 0x241FD78, 1)
480 1192790 [main] ls 2188 fhandler_base::write: binary write
It looks as if passing ' ' to ls -al makes it think that ' ' is the current
working directory. Never looked at the fhandler code so I'm probably way out
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html