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

Re: bug in libsvn_wc/questions.c

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: 2007-04-09 11:58:14 CEST

Peter Lundblad wrote:
> Stefan Küng writes:
>> Hi,
>> There's a problem in the function
>> svn_wc__text_modified_internal_p() right at the beginning:
>> /* No matter which way you look at it, the file needs to exist. */
>> err = svn_io_stat(&finfo, filename,
>> | APR_FINFO_LINK, pool);
>> if ((err && APR_STATUS_IS_ENOENT(err->apr_err))
>> || !(finfo.filetype & (APR_REG | APR_LNK)))
>> {
> Thanks, Stefan! ...and the person who fixes this could also make sure it
> doesn't give a bogus result if err is set but with another error code.
If err is set with another error code then that error code will be
returned to the caller. What's wrong with that? I must be missing
something obvious:

  if ((err && APR_STATUS_IS_ENOENT(err->apr_err))
      || !(finfo.filetype & (APR_REG | APR_LNK)))
      /* There is no entity, or, the entity is not a regular file or link */
      /* So, it can't be modified. */
      *modified_p = FALSE;
      return SVN_NO_ERROR;
  else if (err)
    return err;

@Stefan: can you reproduce that abort just by using the svn client? I'd
like to add a test for this change.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 9 11:58:44 2007

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.