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

RE: svn commit: r1298264 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_wc/props.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 8 Mar 2012 10:38:16 +0100

> -----Original Message-----
> From: svn-role_at_apache.org [mailto:svn-role_at_apache.org]
> Sent: donderdag 8 maart 2012 5:01
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1298264 - in /subversion/branches/1.7.x: ./ STATUS
> subversion/libsvn_wc/props.c
>
> Author: svn-role
> Date: Thu Mar 8 04:01:23 2012
> New Revision: 1298264
>

> Modified: subversion/branches/1.7.x/subversion/libsvn_wc/props.c
> URL:
> http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc
> /props.c?rev=1298264&r1=1298263&r2=1298264&view=diff
> =============================================================
> =================
> --- subversion/branches/1.7.x/subversion/libsvn_wc/props.c (original)
> +++ subversion/branches/1.7.x/subversion/libsvn_wc/props.c Thu Mar 8
> 04:01:23 2012
> @@ -2537,7 +2537,8 @@ svn_wc_canonicalize_svn_prop(const svn_s
> || strcmp(propname, SVN_PROP_EXTERNALS) == 0)
> {
> /* Make sure that the last line ends in a newline */
> - if (propval->data[propval->len - 1] != '\n')
> + if (propval->len == 0
> + || propval->data[propval->len - 1] != '\n')
> {
> new_value = svn_stringbuf_create_from_string(propval, pool);
> svn_stringbuf_appendbyte(new_value, '\n');

Looking at this patch again at a better hour:

Why do we add a '\n' to a 0-byte property value.

I think it should be 'propval->len > 0 && ...'

        Bert
Received on 2012-03-08 10:39:03 CET

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