[Patch]: setting errno to ENOTDIR rather than ENOENT

Corinna Vinschen vinschen@redhat.com
Tue Jan 25 21:24:00 GMT 2005


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.



More information about the Cygwin-patches mailing list