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

RE: svn commit: r888102 - /subversion/trunk/subversion/libsvn_subr/dirent_uri.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Tue, 8 Dec 2009 09:55:11 +0100

> -----Original Message-----
> From: julianfoad_at_apache.org [mailto:julianfoad_at_apache.org]
> Sent: maandag 7 december 2009 20:34
> To: commits_at_subversion.apache.org
> Subject: svn commit: r888102 -
> /subversion/trunk/subversion/libsvn_subr/dirent_uri.c
>
> Author: julianfoad
> Date: Mon Dec 7 19:33:29 2009
> New Revision: 888102
>
> URL: http://svn.apache.org/viewvc?rev=888102&view=rev
> Log:
> * subversion/libsvn_subr/dirent_uri.c
> (svn_dirent_get_absolute): Assert that the input is not a URL, because
> that mistake was made several times recently and new calls to this
> function are being added frequently.

I think we should use an assert(svn_dirent_is_canonical(relative, pool)); here, like in the other dirent functions.

This verifies a bit more than just if it is not a url-like path and it also disables the check in release mode as we do in most path handling.

        Bert
>
> Modified:
> subversion/trunk/subversion/libsvn_subr/dirent_uri.c
>
> Modified: subversion/trunk/subversion/libsvn_subr/dirent_uri.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/dir
> ent_uri.c?rev=888102&r1=888101&r2=888102&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_subr/dirent_uri.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/dirent_uri.c Mon Dec 7
> 19:33:29 2009
> @@ -1540,6 +1540,8 @@
> apr_status_t apr_err;
> const char *path_apr;
>
> + SVN_ERR_ASSERT(! svn_path_is_url(relative));
> +
> /* Merge the current working directory with the relative dirent. */
> SVN_ERR(svn_path_cstring_from_utf8(&path_apr, relative, pool));
>
>
Received on 2009-12-08 09:55:45 CET

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.