delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/12/08:54:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 12 Oct 2005 14:54:38 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: please test: coreutils-5.90-2
Message-ID: <20051012125438.GA12938@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <433F5562 DOT 1060806 AT byu DOT net> <loom DOT 20051009T042005-680 AT post DOT gmane DOT org> <434C3906 DOT 6090304 AT acm DOT org> <434C8100 DOT 9010503 AT byu DOT net> <20051012074755 DOT GU12938 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20051012074755.GU12938@calimero.vinschen.de>
User-Agent: Mutt/1.4.2i

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019