aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ephy-profile-migrator.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index 4919896e3..f013473c0 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -60,6 +60,12 @@ static int do_step_n = -1;
typedef void (*EphyProfileMigrator) (void);
+static gboolean
+profile_dir_exists ()
+{
+ return g_file_test (ephy_dot_dir (), G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR);
+}
+
static void
migrate_cookies ()
{
@@ -787,6 +793,12 @@ ephy_migrator ()
* very beginning. */
migrate_profile_gnome2_to_xdg ();
+ /* If after this point there's no profile dir, there's no point in
+ * running anything because Epiphany has never run in this sytem, so
+ * exit here. */
+ if (!profile_dir_exists ())
+ return TRUE;
+
if (do_step_n != -1) {
if (do_step_n >= EPHY_PROFILE_MIGRATION_VERSION)
return FALSE;