[epiphany] ephy-main: do not run the browser if the migrator fails



commit 195bb27b6c0f710f1d7faff452de71dbb07a9604
Author: Xan Lopez <xan igalia com>
Date:   Fri Aug 31 20:41:22 2012 +0200

    ephy-main: do not run the browser if the migrator fails
    
    Lot's of nasty things could potentially happen.

 src/ephy-main.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-main.c b/src/ephy-main.c
index ea7be1b..063c2f8 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -390,8 +390,13 @@ main (int argc,
   g_setenv ("XLIB_SKIP_ARGB_VISUALS", "1", FALSE);
 
   /* TODO: we want to migrate each WebApp profile too. */
-  if (!private_instance && !application_mode)
-    ephy_profile_utils_do_migration (-1, FALSE);
+  if (!private_instance && !application_mode) {
+    /* If the migration fails we don't really want to continue. */
+    if (!ephy_profile_utils_do_migration (-1, FALSE)) {
+      g_print ("Failed to run the migrator process, Web will now abort.");
+      exit (1);
+    }
+  }
 
   /* Start our services */
   flags = EPHY_FILE_HELPERS_ENSURE_EXISTS;



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