[gnome-initial-setup] Don't abort if gnome-initial-setup user doesn't exist



commit c951dd509b6a9d30b2a8a65a10438e2dc181cfd2
Author: Colin Walters <walters verbum org>
Date:   Tue Nov 20 20:39:46 2012 -0500

    Don't abort if gnome-initial-setup user doesn't exist
    
    Some deployments (e.g. gnome-ostree currently) may have the software
    installed, but not have run the bit to create a gnome-initial-setup
    user.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688776

 .../gnome-initial-setup-copy-worker.c              |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gnome-initial-setup/gnome-initial-setup-copy-worker.c b/gnome-initial-setup/gnome-initial-setup-copy-worker.c
index 071757e..28f222c 100644
--- a/gnome-initial-setup/gnome-initial-setup-copy-worker.c
+++ b/gnome-initial-setup/gnome-initial-setup-copy-worker.c
@@ -23,7 +23,7 @@ get_gnome_initial_setup_home_dir (void)
       return g_strdup (pwp->pw_dir);
   }
 
-  g_error ("Could not find homedir for gnome-initial-setup");
+  return NULL;
 }
 
 static void
@@ -58,10 +58,15 @@ main (int    argc,
 {
   GFile *src;
   GError *error = NULL;
+  char *initial_setup_homedir;
 
   g_type_init ();
 
-  src = g_file_new_for_path (get_gnome_initial_setup_home_dir ());
+  initial_setup_homedir = get_gnome_initial_setup_home_dir ();
+  if (initial_setup_homedir == NULL)
+    exit (EXIT_SUCCESS);
+
+  src = g_file_new_for_path (initial_setup_homedir);
 
   if (!g_file_query_exists (src, NULL))
     exit (EXIT_SUCCESS);



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