This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bug in cygwin's mkdir
- From: Eric Blake <ebb9 at byu dot net>
- To: Chris Mumford <cmumford at Credant dot com>
- Cc: bug-coreutils at gnu dot org, cygwin at cygwin dot com
- Date: Tue, 23 Aug 2005 05:39:53 -0600
- Subject: Re: Bug in cygwin's mkdir
- References: <6EBAD6646B5F934E8E11D44DE818AF12018998AA@troon.Credant.Com>
- Reply-to: cygwin at cygwin dot com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Chris Mumford on 8/22/2005 3:02 PM:
> I came across what I believe is an interesting bug.
>
> Let's say I have a file in a directory named "foo.exe". If I run "mkdir
> foo" then it succeeds. If I then run "mkdir -p foo" then it fails. If I
> remove foo.exe then "mkdir -p foo" succeeds.
>
> The error message contains says "foo exists but is not a directory".
Bugs in the cygwin packaging of coreutils should be reported to cygwin AT
cygwin.com. Setting the reply-to: accordingly.
What you are seeing is caused by cygwin's auto-.exe extension behavior,
and is not a bug in the upstream sources. The problem is that on cygwin,
stat(2) on "foo" returns information for "foo.exe" if "foo" did not exist
(a cygwin design decision that helps 99% of the time, since Windows does
not like executables without extensions but Unix does; but it interferes
in this case). The code path for `mkdir -p' uses stat(2) while the code
path for regular `mkdir' does not. Now that you've reported it, the
cygwin team will probably write a cygwin-specific patch to `mkdir -p' to
ignore stat(2) if it appended .exe.
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDCwsJ84KuGfSFAYARArlHAJ9wx80UqnFoQL/iiYMUUTOo/9vp+wCgo9Cf
/sdnHtBseRG5sGtQ8+aEddQ=
=0vDO
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/