diff options
author | Stefano Facchini <stefano.facchini@gmail.com> | 2012-09-07 05:15:08 +0800 |
---|---|---|
committer | Stefano Facchini <stefano.facchini@gmail.com> | 2012-09-29 05:01:37 +0800 |
commit | 892cab7e083e801b5fb5e7047b6305cfe9acd7b6 (patch) | |
tree | 0405d90047f24f32ef6b5a2c2b6ae586a8994d9f | |
parent | 90d1b0d14f4bb7b4c4fc8043cad954e5e4372c79 (diff) | |
download | gsoc2013-epiphany-892cab7e083e801b5fb5e7047b6305cfe9acd7b6.tar gsoc2013-epiphany-892cab7e083e801b5fb5e7047b6305cfe9acd7b6.tar.gz gsoc2013-epiphany-892cab7e083e801b5fb5e7047b6305cfe9acd7b6.tar.bz2 gsoc2013-epiphany-892cab7e083e801b5fb5e7047b6305cfe9acd7b6.tar.lz gsoc2013-epiphany-892cab7e083e801b5fb5e7047b6305cfe9acd7b6.tar.xz gsoc2013-epiphany-892cab7e083e801b5fb5e7047b6305cfe9acd7b6.tar.zst gsoc2013-epiphany-892cab7e083e801b5fb5e7047b6305cfe9acd7b6.zip |
ephy-profile-utils: don't replace environment when spwaning ephy-profile-migrator
Instead, just append the new variable to the existing environment.
https://bugzilla.gnome.org/show_bug.cgi?id=683538
-rw-r--r-- | lib/ephy-profile-utils.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c index 51dd7e1b8..07c960559 100644 --- a/lib/ephy-profile-utils.c +++ b/lib/ephy-profile-utils.c @@ -208,7 +208,13 @@ ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, int status; char *argv[6] = { EPHY_PROFILE_MIGRATOR, "-v" }; int i = 2; /* index for argv, start filling at 2. */ - char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" }; + char **envp; + + envp = g_environ_setenv (g_get_environ (), + "EPHY_LOG_MODULES", "ephy-profile", + TRUE); + /* To avoid breaking test-ephy-migrator */ + envp = g_environ_unsetenv (envp, EPHY_UUID_ENVVAR); argv[i++] = version = g_strdup_printf ("%d", EPHY_PROFILE_MIGRATION_VERSION); @@ -234,6 +240,7 @@ ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, &status, &error); g_free (index); g_free (version); + g_strfreev (envp); if (error) { LOG ("Failed to run migrator: %s", error->message); |