aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-05-16 13:32:57 +0800
committerXan Lopez <xan@igalia.com>2012-05-16 13:32:57 +0800
commit0f356e2c1eb200fd286b468bf0c7adc4b232d9a0 (patch)
tree8d8d4669d7d42958ce8f2899d34c64dee04ad6f5
parentaf721d7cb557611ad2e4d3a6694c9d849495ff03 (diff)
downloadgsoc2013-epiphany-0f356e2c1eb200fd286b468bf0c7adc4b232d9a0.tar
gsoc2013-epiphany-0f356e2c1eb200fd286b468bf0c7adc4b232d9a0.tar.gz
gsoc2013-epiphany-0f356e2c1eb200fd286b468bf0c7adc4b232d9a0.tar.bz2
gsoc2013-epiphany-0f356e2c1eb200fd286b468bf0c7adc4b232d9a0.tar.lz
gsoc2013-epiphany-0f356e2c1eb200fd286b468bf0c7adc4b232d9a0.tar.xz
gsoc2013-epiphany-0f356e2c1eb200fd286b468bf0c7adc4b232d9a0.tar.zst
gsoc2013-epiphany-0f356e2c1eb200fd286b468bf0c7adc4b232d9a0.zip
ephy-profile-utils: tweak migrator location code
The path to the just built migrator is known at compile time, so no need to create strings at runtime. Also, share the name of the binary itself to avoid silly bugs like last time.
-rw-r--r--lib/ephy-profile-utils.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index 1aa5fcd95..297159eef 100644
--- a/lib/ephy-profile-utils.c
+++ b/lib/ephy-profile-utils.c
@@ -187,14 +187,16 @@ _ephy_profile_utils_query_form_auth_data (const char *uri,
g_free (key_str);
}
+#define EPHY_PROFILE_MIGRATOR "ephy-profile-migrator"
+
gboolean
ephy_profile_utils_do_migration (int test_to_run, gboolean debug)
{
gboolean ret;
GError *error = NULL;
- char *index = NULL, *path = NULL;
+ char *index = NULL;
int status;
- char *argv[3] = { "ephy-profile-migrator" };
+ char *argv[3] = { EPHY_PROFILE_MIGRATOR };
char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" };
if (test_to_run != -1) {
@@ -207,15 +209,12 @@ ephy_profile_utils_do_migration (int test_to_run, gboolean debug)
argv[1] = NULL;
}
- if (debug) {
- path = g_strdup_printf ("%s/lib/ephy-profile-migrator", TOP_BUILD_DIR);
- argv[0] = path;
- }
+ if (debug)
+ argv[0] = TOP_BUILD_DIR"/lib/"EPHY_PROFILE_MIGRATOR;
ret = g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, NULL,
&status, &error);
- g_free (path);
g_free (index);
if (error) {