From 52ab38452b2535bec1276bc82bb73b02d138c091 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Thu, 23 Jul 2009 09:27:47 -0400 Subject: [PATCH] Ignore .pkla files starting with dot and don't segfault on error path --- src/polkitbackend/polkitbackendlocalauthorizationstore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polkitbackend/polkitbackendlocalauthorizationstore.c b/src/polkitbackend/polkitbackendlocalauthorizationstore.c index 413ed4b..1c898f7 100644 --- a/src/polkitbackend/polkitbackendlocalauthorizationstore.c +++ b/src/polkitbackend/polkitbackendlocalauthorizationstore.c @@ -520,7 +520,7 @@ polkit_backend_local_authorization_store_ensure (PolkitBackendLocalAuthorization name = g_file_info_get_name (file_info); /* only consider files with the appropriate extension */ - if (g_str_has_suffix (name, store->priv->extension)) + if (g_str_has_suffix (name, store->priv->extension) && name[0] != '.') files = g_list_prepend (files, g_file_get_child (store->priv->directory, name)); g_object_unref (file_info); @@ -548,7 +548,7 @@ polkit_backend_local_authorization_store_ensure (PolkitBackendLocalAuthorization if (!g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, - NULL)) + &error)) { g_warning ("Error loading key-file %s: %s", filename, error->message); g_error_free (error); -- 2.7.4