apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: svn commit: r821306 - /apr/apr/trunk/include/apr_errno.h
Date Sat, 03 Oct 2009 12:58:41 GMT
Back in 2002 I raised a question [1] about mapping the Windows error
code ERROR_DIRECTORY into APR_STATUS_IS_ENTODIR. I can't remember that
far back why we never did this; I only remember that Subversion ended up
testing for both ENOENT and ENOTDIR because of the difference in
behaviour between *nix and Windows.

In the meantime, I finally caught up with real error reports about
Subversion that can be tracked back to this omission. Hence r821306,
which I intend to backport to the 1.4, 1.3 and possibly 0.9 branches.
But first, I'd like to solicit opinions and/or long-term memories: does
anyone recall why this would be wrong?

(Regarding the different behaviour between *ix and Win: it could be
argued that the whole ENOTDIR test should be included in the ENOENT
test. That would hide quirky differences between operating systems
somewhat.)

-- Brane


[1]
http://mail-archives.apache.org/mod_mbox/apr-dev/200204.mbox/%3C3CC358CF.5030505@xbc.nu%3E

brane@apache.org wrote:
> Author: brane
> Date: Sat Oct  3 12:50:34 2009
> New Revision: 821306
>
> URL: http://svn.apache.org/viewvc?rev=821306&view=rev
> Log:
> On Windows, map the system error code ERROR DIRECTORY which means
> "directory name is not valid" into APR_STATUS_IS_ENOTDIR.
>
> Modified:
>     apr/apr/trunk/include/apr_errno.h
>
> Modified: apr/apr/trunk/include/apr_errno.h
> URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_errno.h?rev=821306&r1=821305&r2=821306&view=diff
> ==============================================================================
> --- apr/apr/trunk/include/apr_errno.h (original)
> +++ apr/apr/trunk/include/apr_errno.h Sat Oct  3 12:50:34 2009
> @@ -1046,7 +1046,8 @@
>                  || (s) == APR_OS_START_SYSERR + ERROR_BAD_NETPATH \
>                  || (s) == APR_OS_START_SYSERR + ERROR_BAD_NET_NAME \
>                  || (s) == APR_OS_START_SYSERR + ERROR_BAD_PATHNAME \
> -                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE)
> +                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DRIVE \
> +                || (s) == APR_OS_START_SYSERR + ERROR_DIRECTORY)
>  #define APR_STATUS_IS_ENOSPC(s)         ((s) == APR_ENOSPC \
>                  || (s) == APR_OS_START_SYSERR + ERROR_DISK_FULL)
>  #define APR_STATUS_IS_ENOMEM(s)         ((s) == APR_ENOMEM \
>
>
>   


Mime
View raw message