[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Workaround for missing ERROR_DIRECTORY constant in APR

From: Branko Cibej <brane_at_xbc.nu>
Date: Sat, 03 Oct 2009 21:54:50 +0200

Bert Huijben wrote:
>> -----Original Message-----
>> From: Wolfgang Stengel [mailto:wolfgang.stengel_at_efactory.de]
>> Sent: donderdag 1 oktober 2009 16:36
>> To: dev_at_subversion.tigris.org
>> Subject: [PATCH] Workaround for missing ERROR_DIRECTORY constant in APR
>>
>> Hello Subversion team,
>>
>> please consinder the attached patch. Some file systems (for example
>> NFS)
>> produce a different error code on Windows than that which is handled by
>> APR natively. This results in a number of problems with Subversion, for
>> example the function svn_wc_check_wc() does not fail correctly on
>> inexistant files.
>>
>> The attached patch provides a simple workaround. It mappes the
>> error code ERROR_DIRECTORY to the error code ERROR_PATH_NOT_FOUND which
>> can be caught by the APR_STATUS_IS_ENOTDIR() macro. The patch also
>> checks if the constant ERROR_DIRECTORY even exists and if the problem
>> in APR has been fixed in the meantime (by checking if
>> APR_STATUS_IS_ENOENT() or APR_STATUS_IS_ENOTDIR() already catch
>> ERROR_DIRECTORY).
>>
>
> Did you check if this is not just an issue in your NFS driver?
>
> If the issue is fixed there, all application issues disappear at the same
> time.
>
> It would be strange if all applications have to apply a fix, because a
> specific network driver causes an error.
>
> What would happen if your video or soundcard driver did the same thing?
> Should Subversion change to support your hardware or should the driver
> properly support the OS?
>

In fact, APR never maps the ERROR_DIRECTORY code; so even if it's a
driver problem, the issue in APR is real.

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2403261
Received on 2009-10-03 21:54:59 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.