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]

Re: please test: coreutils-5.90-2


On Oct 12 09:47, Corinna Vinschen wrote:
> On Oct 11 21:20, Eric Blake wrote:
> > $ df -T c: j:
> > Filesystem    Type   1K-blocks      Used Available Use% Mounted on
> > c:    system,fixed    29286460  20471796   8814664  70% /cygdrive/c
> > j:   system,remote     6260992   4508800   1752192  73% /cygdrive/j
> > $ mkdir -p j:/dir
> > $ mkdir -p c:/dir
> > mkdir: cannot create directory `c:': Permission denied
> > 
> > I am suspecting a cygwin bug here.  mkdir("c:") should fail with EEXIST,
> > not EACCES.  5.90 exposes this bug, where 5.3.0 did not, because the
> > algorithm for mkdir -p was changed to attempt mkdir() first instead of stat().

This is a problem in the new mkdir.  When trying to call CreateDirectory
on a local root directory, the error returned by Windows is
ERROR_ACCESS_DENIED, not ERROR_ALREADY_EXISTS.  Consequentially the error
is converted to EACCES, not EEXIST.  This is an error condition which mkdir
should handle gracefully.  I have serious problems to change this in
Cygwin since we can't find out why ERROR_ACCESS_DENIED has been returned
without jumping through loops.

> > Continuing the example, I also find it odd that from WinXP, I get EBADRQC
> > instead of the more familiar ENOENT when removing a nonexistant directory
> > on a remote FAT drive:

Trying to remove a non-existant directory on a 9x share apparently
returns ERROR_INVALID_FUNCTION instead of ERROR_FILE_NOT_FOUND.  I've
kludged this to be converted accordingly.  Nothing new here.  We're
used to convert 9x error messages into useful error messages...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
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/


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