[glib] gsettings: schema_list should use the passed schema's source



commit a3a97dca3aa227182088be47db75fc57f1186946
Author: Cole Robinson <crobinso redhat com>
Date:   Mon Nov 2 20:28:49 2015 -0500

    gsettings: schema_list should use the passed schema's source
    
    currently schema_list will iterate over the default SchemaSource
    list, and not the one associated with the passed in Schema. This
    means schema_list can give incorrect results for a Schema fetched
    from a non-default SchemaSource, like via new_from_directory.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757506

 gio/gsettingsschema.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index a0265e7..8ed800a 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -1145,7 +1145,7 @@ g_settings_schema_list (GSettingsSchema *schema,
 
             child_table = NULL;
 
-            for (source = schema_sources; source; source = source->parent)
+            for (source = schema->source; source; source = source->parent)
               if ((child_table = gvdb_table_get_table (source->table, g_variant_get_string (child_schema, 
NULL))))
                 break;
 


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