devhelp/devhelp-load-uris.patch

34 lines
1.0 KiB
Diff
Raw Normal View History

Index: src/dh-parser.c
===================================================================
--- src/dh-parser.c (revision 1263)
+++ src/dh-parser.c (working copy)
@@ -66,6 +66,7 @@
{
gint i;
gint line, col;
+ gchar *tmp_base;
const gchar *title = NULL;
const gchar *base = NULL;
const gchar *name = NULL;
@@ -126,11 +127,18 @@
}
if (base) {
- parser->base = g_strdup (base);
+ tmp_base = g_strdup (base);
} else {
- parser->base = g_path_get_dirname (parser->path);
+ tmp_base = g_path_get_dirname (parser->path);
}
+ parser->base = g_filename_to_uri (tmp_base, NULL, NULL);
+ /* In case the conversion didn't work */
+ if (parser->base)
+ g_free (tmp_base);
+ else
+ parser->base = tmp_base;
+
link = dh_link_new (DH_LINK_TYPE_BOOK,
parser->base,
name,