[epiphany/gnome-3-24] profile-migrator: Don't try to migrate URLs table if no history exists



commit 7369aa4260732ffe51cfcf48769843c54416971c
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue May 9 15:00:42 2017 -0500

    profile-migrator: Don't try to migrate URLs table if no history exists
    
    This causes warnings to appear when running a fresh profile for the
    first time.

 src/profile-migrator/ephy-profile-migrator.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c
index 94a8eb4..158ab67 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -223,6 +223,9 @@ migrate_new_urls_table (void)
   GError *error = NULL;
 
   filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL);
+  if (!g_file_test (filename, G_FILE_TEST_EXISTS))
+    return;
+
   history_database = ephy_sqlite_connection_new (EPHY_SQLITE_CONNECTION_MODE_READWRITE);
   ephy_sqlite_connection_open (history_database, filename, &error);
 


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