diff options
-rw-r--r-- | lib/ephy-profile-utils.c | 7 | ||||
-rw-r--r-- | lib/ephy-profile-utils.h | 2 | ||||
-rw-r--r-- | src/ephy-main.c | 2 | ||||
-rw-r--r-- | tests/ephy-migration-test.c | 4 |
4 files changed, 10 insertions, 5 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c index 58abfff61..51dd7e1b8 100644 --- a/lib/ephy-profile-utils.c +++ b/lib/ephy-profile-utils.c @@ -200,7 +200,7 @@ _ephy_profile_utils_query_form_auth_data (const char *uri, #define EPHY_PROFILE_MIGRATOR "ephy-profile-migrator" gboolean -ephy_profile_utils_do_migration (int test_to_run, gboolean debug) +ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, gboolean debug) { gboolean ret; GError *error = NULL; @@ -219,6 +219,11 @@ ephy_profile_utils_do_migration (int test_to_run, gboolean debug) argv[i++] = index; } + if (profile_directory != NULL) { + argv[i++] = "-p"; + argv[i++] = (char *)profile_directory; + } + argv[i++] = NULL; if (debug) diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h index 8f50922c6..5a9b84433 100644 --- a/lib/ephy-profile-utils.h +++ b/lib/ephy-profile-utils.h @@ -32,7 +32,7 @@ int ephy_profile_utils_get_migration_version (void); gboolean ephy_profile_utils_set_migration_version (int version); -gboolean ephy_profile_utils_do_migration (int test_to_run, gboolean debug); +gboolean ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, gboolean debug); void _ephy_profile_utils_store_form_auth_data (const char *uri, const char *form_username, diff --git a/src/ephy-main.c b/src/ephy-main.c index 60a0e616f..4ea621afe 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -392,7 +392,7 @@ main (int argc, /* TODO: we want to migrate each WebApp profile too. */ if (!private_instance && !application_mode) { /* If the migration fails we don't really want to continue. */ - if (!ephy_profile_utils_do_migration (-1, FALSE)) { + if (!ephy_profile_utils_do_migration ((const char *)profile_directory, -1, FALSE)) { g_print ("Failed to run the migrator process, Web will now abort."); exit (1); } diff --git a/tests/ephy-migration-test.c b/tests/ephy-migration-test.c index 3051f2d59..983e8ce48 100644 --- a/tests/ephy-migration-test.c +++ b/tests/ephy-migration-test.c @@ -36,7 +36,7 @@ test_do_migration_simple (void) { gboolean ret; - ret = ephy_profile_utils_do_migration (-1, TRUE); + ret = ephy_profile_utils_do_migration (NULL, -1, TRUE); g_assert (ret); } @@ -45,7 +45,7 @@ test_do_migration_invalid (void) { gboolean ret; - ret = ephy_profile_utils_do_migration (EPHY_PROFILE_MIGRATION_VERSION + 1, TRUE); + ret = ephy_profile_utils_do_migration (NULL, EPHY_PROFILE_MIGRATION_VERSION + 1, TRUE); g_assert (ret == FALSE); } |