apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucian Adrian Grijincu" <lucian.griji...@gmail.com>
Subject Re: ENOENT / ENODIR in apr_stat - wrong comment or code
Date Sun, 28 Oct 2007 12:29:37 GMT
On 10/28/07, Lucian Adrian Grijincu <lucian.grijincu@gmail.com> wrote:
> in file_io/unix/filestat.c there this code block:
>
>
>         /* WARNING: All errors but not found will be handled as not directory
>          */
>         if (errno != ENOENT)
>             return APR_ENOENT;
>         else
>             return errno;
>
> http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/filestat.c?view=markup
>
>
> Either the code is wrong or the comment (or, of course, my interpretation).
>
> Should it be (and respect the comment):
>
>         /* WARNING: All errors but not found will be handled as not directory
>          */
>         if (errno != ENOENT)
>             return APR_ENODIR;
>         else
>             return errno;
>
> or just this (it has the same functionality):
>

sorry, I meant:
        return APR_ENOENT;

> --
> Lucian
>

Mime
View raw message