[yelp/yelp-3-0] [yelp-uri] Use EXTERNAL for files/directories that	exist but aren't a document
- From: Shaun McCance <shaunm src gnome org>
 
- To: svn-commits-list gnome org
 
- Cc: 
 
- Subject: [yelp/yelp-3-0] [yelp-uri] Use EXTERNAL for files/directories that	exist but aren't a document
 
- Date: Sun, 15 Nov 2009 22:36:51 +0000 (UTC)
 
commit 6825664cc0a334c9bc0e8d1db765c71482cc370f
Author: Shaun McCance <shaunm gnome org>
Date:   Fri Oct 23 16:33:11 2009 -0500
    [yelp-uri] Use EXTERNAL for files/directories that exist but aren't a document
 libyelp/yelp-uri.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index a81a459..605f30b 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -913,11 +913,16 @@ resolve_gfile (YelpUri *uri, const gchar *hash)
     }
 
     if (priv->tmptype == YELP_URI_DOCUMENT_TYPE_UNRESOLVED) {
+        priv->tmptype = YELP_URI_DOCUMENT_TYPE_EXTERNAL;
         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);
+            GFile *child = g_file_get_child (priv->gfile, "index.page");
+            if (g_file_query_exists (child, NULL)) {
+                priv->tmptype = YELP_URI_DOCUMENT_TYPE_MALLARD;
+                if (priv->page_id == NULL)
+                    priv->page_id = g_strdup (hash);
+            }
+            g_object_unref (child);
         }
         else {
             gchar *basename;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]