[gnome-initial-setup/gnome-3-16] privacy: Look for the right key in os-release



commit 6b5685ba104ec74a72d935a48c3dd7ec2e8ea9b2
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 18 12:32:57 2015 -0400

    privacy: Look for the right key in os-release
    
    The correct key is PRIVACY_POLICY_URL. Unfortunately, Fedora
    got this wrong when it was initially added, so look for
    both this key and PRIVACY_POLICY.

 .../pages/privacy/gis-privacy-page.c               |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnome-initial-setup/pages/privacy/gis-privacy-page.c 
b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
index 86f74db..4bbd72d 100644
--- a/gnome-initial-setup/pages/privacy/gis-privacy-page.c
+++ b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
@@ -95,7 +95,10 @@ update_os_data (GisPrivacyPage *page)
   if (g_file_get_contents ("/etc/os-release", &buffer, NULL, NULL))
     {
       name = get_item (buffer, "NAME");
-      privacy_policy = get_item (buffer, "PRIVACY_POLICY");
+      privacy_policy = get_item (buffer, "PRIVACY_POLICY_URL");
+      /* Fedora had PRIVACY_POLICY=... in os-release for a while, unfortunately */
+      if (!privacy_policy)
+        privacy_policy = get_item (buffer, "PRIVACY_POLICY");
       g_free (buffer);
     }
 


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