[evolution-patches] tiny fix for tesgtkhtml
- From: Larry Ewing <lewing ximian com>
- To: Radek Doulik <rodo ximian com>, patches <evolution-patches ximian com>
- Subject: [evolution-patches] tiny fix for tesgtkhtml
- Date: 17 May 2003 11:53:27 -0500
htmlurl.c had some bad logic for url combining, this is only used in the
test program but it was annoying as I tested things so here is a small
fix.
--Larry
Index: htmlurl.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlurl.c,v
retrieving revision 1.15
diff -u -p -r1.15 htmlurl.c
--- htmlurl.c 13 Dec 2000 23:10:51 -0000 1.15
+++ htmlurl.c 17 May 2003 16:51:15 -0000
@@ -468,7 +468,7 @@ concat_dir_and_file (const char *dir, co
{
/* If the directory name doesn't have a / on the end, we need
to add one so we get a proper path to the file */
- if (dir [strlen(dir) - 1] != PATH_SEP)
+ if (*dir && dir [strlen(dir) - 1] != PATH_SEP)
return g_strconcat (dir, PATH_SEP_STR, file, NULL);
else
return g_strconcat (dir, file, NULL);
@@ -492,10 +492,10 @@ html_url_append_path (const HTMLURL *url
if((ptr = strchr(tmppath, '?')))
*ptr = 0;
- i = strlen(tmppath) - 1;
+ i = strlen(tmppath);
/* Remove first '/' from the right */
- while(i && tmppath[i] != '/')
+ while(i && tmppath[i-1] != '/')
i--;
if(i)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]