aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-05-09 23:59:04 +0800
committerXan Lopez <xan@igalia.com>2012-05-09 23:59:04 +0800
commitcc55649fb5923e1ba1c89c3c8aa25b1cb9401cda (patch)
tree4af432767e06d2273e5a22dffbafceed8944ebbe
parent001bb8c1a001d3ab2b3f8f704609e04042ef767d (diff)
downloadgsoc2013-epiphany-cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda.tar
gsoc2013-epiphany-cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda.tar.gz
gsoc2013-epiphany-cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda.tar.bz2
gsoc2013-epiphany-cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda.tar.lz
gsoc2013-epiphany-cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda.tar.xz
gsoc2013-epiphany-cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda.tar.zst
gsoc2013-epiphany-cc55649fb5923e1ba1c89c3c8aa25b1cb9401cda.zip
ephy-profile-utils: make ephy_profile_utils_do_migration more verbose on failure
So we can properly test it.
-rw-r--r--lib/ephy-profile-utils.c11
-rw-r--r--lib/ephy-profile-utils.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index a9edd7241..05367be8e 100644
--- a/lib/ephy-profile-utils.c
+++ b/lib/ephy-profile-utils.c
@@ -187,19 +187,22 @@ _ephy_profile_utils_query_form_auth_data (const char *uri,
g_free (key_str);
}
-void
+gboolean
ephy_profile_utils_do_migration ()
{
+ gboolean ret;
GError *error = NULL;
char *argv[1] = { "ephy-profile-migrator" };
char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" };
- g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH,
- NULL, NULL, NULL, NULL,
- NULL, &error);
+ ret = g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH,
+ NULL, NULL, NULL, NULL,
+ NULL, &error);
if (error) {
LOG ("Failed to run migrator: %s", error->message);
g_error_free (error);
}
+
+ return ret;
}
diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h
index d26fe1ca5..6a01549c7 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);
-void ephy_profile_utils_do_migration (void);
+gboolean ephy_profile_utils_do_migration (void);
void _ephy_profile_utils_store_form_auth_data (const char *uri,
const char *form_username,