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

[PATCH] bug report for svn_ra_dav__get_repos_root()

From: plasma <plasmaball_at_pchome.com.tw>
Date: 2004-01-15 09:39:27 CET

On Thu, Jan 15, 2004 at 02:40:54PM +0800, plasma wrote:
> I was tracing a strange error in svk, and found get_repos_root()
> returns an incorrect result if the target is a repo root.

I spent some time to trace the code, and found it's not too difficult
for me. Below is the patch:

--- subversion/libsvn_ra_dav/session.c.orig Thu Jan 15 14:59:04 2004
+++ subversion/libsvn_ra_dav/session.c Thu Jan 15 14:59:48 2004
@@ -777,7 +777,7 @@
       if (len <= relative_len)
         return svn_error_create(APR_EGENERAL, NULL,
                                 "Impossibly long relative url.");
- len = len - relative_len - 1;
+ len = len - ( relative_len ? (relative_len + 1) : 0 );
       ras->repos_root = apr_pstrmemdup(ras->pool, ras->url, len);
     }
 
My problem seems go away. I encounter another problem while running
svk, but that's another story.

plasma

==========================================================
 <<<®a¸Ì¦³Ä_Ä_ªº¤÷¥À½Ð¶i>>>
 http://edm-prg.epaper.com.tw/click.php?ad_code=54833
==========================================================
 PChome¥æ¤Í~~©¯ºÖ¤Ñ¤Ñ¦³ \*^o^*//
 http://love.pchome.com.tw/
==========================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 15 09:40:15 2004

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.