From ceab3ce08927ec45bb880371b7f31041a5192851 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Wed, 12 Dec 2012 13:09:39 +0100 Subject: Define the names of the history and bookmarks files in just one place --- lib/ephy-file-helpers.c | 2 +- lib/ephy-profile-migrator.c | 6 +++--- lib/ephy-profile-utils.h | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c index 898e218bd..b21b8a7f5 100644 --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -353,7 +353,7 @@ ephy_file_helpers_init (const char *profile_dir, if (steal_data_from_profile && profile_dir) { int i; - char *files_to_copy[] = { "ephy-history.db", "ephy-bookmarks.xml" }; + char *files_to_copy[] = { EPHY_HISTORY_FILE, EPHY_BOOKMARKS_FILE }; for (i = 0; i < G_N_ELEMENTS (files_to_copy); i++) { diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c index c7cf49415..e757cbd80 100644 --- a/lib/ephy-profile-migrator.c +++ b/lib/ephy-profile-migrator.c @@ -559,11 +559,11 @@ migrate_history (void) char buffer[1024]; HistoryParseData parse_data; - gchar *temporary_file = g_build_filename (ephy_dot_dir (), "ephy-history.db", NULL); + gchar *temporary_file = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL); /* Do nothing if the history file already exists. Safer than wiping * it out. */ if (g_file_test (temporary_file, G_FILE_TEST_EXISTS)) { - g_warning ("Did not migrate Epiphany's history, the ephy-history.db file already exists"); + g_warning ("Did not migrate Epiphany's history, the %s file already exists", EPHY_HISTORY_FILE); g_free (temporary_file); return; } @@ -779,7 +779,7 @@ migrate_new_urls_table (void) char *filename; GError *error = NULL; - filename = g_build_filename (ephy_dot_dir (), "ephy-history.db", NULL); + filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL); history_database = ephy_sqlite_connection_new (); ephy_sqlite_connection_open (history_database, filename, &error); diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h index 5a9b84433..1e9d071db 100644 --- a/lib/ephy-profile-utils.h +++ b/lib/ephy-profile-utils.h @@ -28,6 +28,10 @@ #define EPHY_PROFILE_MIGRATION_VERSION 8 +#define EPHY_HISTORY_FILE "ephy-history.db" +#define EPHY_BOOKMARKS_FILE "ephy-bookmarks.xml" +#define EPHY_BOOKMARKS_FILE_RDF "bookmarks.rdf" + int ephy_profile_utils_get_migration_version (void); gboolean ephy_profile_utils_set_migration_version (int version); -- cgit v1.2.3