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_SIZE | APR_FINFO_MTIME | APR_FINFO_TYPE
> | 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.
> The if clause checks for an error and the wrong filetype. The problem
> is that finfo.filetype is an apr_filetype_e enum, but it's treated
> like a bitmask in the check.
>
> I think the correct way to check this would be something like this:
>
> if ((err && APR_STATUS_IS_ENOENT(err->apr_err))
> || ((finfo.filetype != APR_REG) && (finfo.filetype != APR_LNK)))
^ ! err &&
Thanks,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 4 14:24:07 2007