[yelp/yelp-3-0] [yelp-uri] Handle page IDs on file paths



commit 8f5564efccbc90abe021ccf40a23bd6ecae3a837
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Oct 19 15:21:55 2009 -0500

    [yelp-uri] Handle page IDs on file paths

 libyelp/yelp-uri.c            |    2 ++
 tests/uri/path-mallard-2.test |  Bin 0 -> 385 bytes
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index 63452eb..83c1537 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -876,6 +876,8 @@ resolve_gfile (YelpUri *uri, const gchar *hash)
         if (g_file_info_get_attribute_uint32 (info, G_FILE_ATTRIBUTE_STANDARD_TYPE) ==
             G_FILE_TYPE_DIRECTORY) {
             priv->tmptype = YELP_URI_DOCUMENT_TYPE_MALLARD;
+            if (priv->page_id == NULL)
+                priv->page_id = g_strdup (hash);
         }
         else {
             gchar *basename;
diff --git a/tests/uri/path-mallard-2.test b/tests/uri/path-mallard-2.test
new file mode 100644
index 0000000..2499e78
Binary files /dev/null and b/tests/uri/path-mallard-2.test differ



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