[yelp] Fix handling of xref links with anchors in resolve_file_path()



commit b617a61287862c909b6819173bdac4e0c419667a
Author: Tails developers <tails boum org>
Date:   Sat Oct 13 16:06:15 2012 +0000

    Fix handling of xref links with anchors in resolve_file_path()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686095

 libyelp/yelp-uri.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index e53062a..be23df2 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -562,7 +562,7 @@ resolve_file_path (YelpUri *uri)
     YelpUriPrivate *base_priv = NULL;
     YelpUriPrivate *priv = GET_PRIV (uri);
     gchar *path;
-    const gchar *hash = strchr (priv->res_arg, '#');
+    const gchar *hash;
 
     /* Treat xref: URIs like relative file paths */
     if (g_str_has_prefix (priv->res_arg, "xref:")) {
@@ -574,6 +574,7 @@ resolve_file_path (YelpUri *uri)
     if (priv->res_base)
         base_priv = GET_PRIV (priv->res_base);
 
+    hash = strchr (priv->res_arg, '#');
     if (hash) {
         path = g_strndup (priv->res_arg, hash - priv->res_arg);
         hash++;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]