[epiphany/profile-migrator-diego: 8/12] e-profile-migrator: update web_app_links
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/profile-migrator-diego: 8/12] e-profile-migrator: update web_app_links
- Date: Mon, 3 Sep 2012 10:26:59 +0000 (UTC)
commit e5d46f7f8c2fd1b44b3d85c6a83bba1577437f61
Author: Diego Escalante Urrelo <diegoe igalia com>
Date: Mon Sep 3 05:24:21 2012 -0500
e-profile-migrator: update web_app_links
lib/ephy-profile-migrator.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index a3b6518..8eeb391 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -820,8 +820,11 @@ fix_desktop_file_and_return_new_location (const char *dir)
return result;
}
-static void
-migrate_web_app_links ()
+static gboolean
+migrate_web_app_links (const char *profile_dir,
+ const char *dest_dir,
+ gboolean dry_run,
+ gpointer data)
{
GList *apps, *p;
@@ -851,11 +854,19 @@ migrate_web_app_links ()
/* FIXME: Updating the file info and setting it again should
* work, but it does not? Just delete and create the link
* again. */
- g_file_delete (file, 0, 0);
+ if (dry_run)
+ LOG ("[web_app_links] DR: Deleting old link %s", app_link);
+ else
+ g_file_delete (file, 0, 0);
+
g_object_unref (file);
file = g_file_new_for_path (app_link);
- g_file_make_symbolic_link (file, new_target, NULL, NULL);
+
+ if (dry_run)
+ LOG ("[web_app_links] DR: Creating new link %s -> %s", app_link, new_target);
+ else
+ g_file_make_symbolic_link (file, new_target, NULL, NULL);
g_object_unref (info);
g_free (new_target);
@@ -868,6 +879,8 @@ migrate_web_app_links ()
}
ephy_web_application_free_application_list (apps);
+
+ return TRUE;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]