This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [Patch]: setting errno to ENOTDIR rather than ENOENT
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 25 Jan 2005 22:24:45 +0100
- Subject: Re: [Patch]: setting errno to ENOTDIR rather than ENOENT
- References: <41F6B1F6.5207C318@phumblet.no-ip.org>
- Reply-to: cygwin-patches at cygwin dot com
Well done! I looked into this a few hours ago and missed how easy a
solution would be. *mumbling something about needing glasses*
I guess this is ok to check in after adding some spaces...
On Jan 25 15:54, Pierre A. Humblet wrote:
> 2005-01-25 Pierre Humblet <pierre.humblet@ieee.org>
>
> * path.cc (path_conv::check): Return ENOTDIR rather than ENOENT
> when a component is not a directory. Remove unreachable code.
> (digits): Delete.
>
> Index: path.cc
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
> retrieving revision 1.338
> diff -u -p -r1.338 path.cc
> --- path.cc 18 Jan 2005 13:00:18 -0000 1.338
> +++ path.cc 25 Jan 2005 20:08:53 -0000
> @@ -655,12 +655,6 @@ path_conv::check (const char *src, unsig
> full_path[3] = '\0';
> }
>
> - if ((opt & PC_SYM_IGNORE) && pcheck_case == PCHECK_RELAXED)
> - {
> - fileattr = GetFileAttributes (this->path);
> - goto out;
> - }
> -
> symlen = sym.check (full_path, suff, opt | fs.has_ea ());
>
> if (sym.minor || sym.major)
> @@ -680,7 +674,7 @@ path_conv::check (const char *src, unsig
> if (pcheck_case == PCHECK_STRICT)
> {
> case_clash = true;
> - error = ENOENT;
> + error = component?ENOTDIR:ENOENT;
^^^^^^^^^^^^^^^^^^^^^^^^^
...here.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:cygwin@cygwin.com
Red Hat, Inc.