[epiphany/mcatanzaro/web-apps-again-again-again: 6/9] profile-migrator: fail migration if current profile dir is moved
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/web-apps-again-again-again: 6/9] profile-migrator: fail migration if current profile dir is moved
- Date: Fri, 24 May 2019 20:54:26 +0000 (UTC)
commit 0ca50a933cc9a9a7ee9cf925d4c1f936aa5e677f
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri May 24 15:32:18 2019 -0500
profile-migrator: fail migration if current profile dir is moved
This is for web apps only, and only if they are migrated before the
default profile. The first attempt to run the web app after migration
will fail, and it will need to be started a second time in order to pick
up the new profile dir in the modified desktop file. This is pretty
unfortunate, but difficult to avoid.
src/profile-migrator/ephy-profile-migrator.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c
index 63d57eee3..b6d8ca579 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -1419,6 +1419,15 @@ ephy_migrator (void)
m ();
}
+ if (!g_file_test (ephy_profile_dir (), G_FILE_TEST_EXISTS)) {
+ LOG ("Original profile directory does not exist. This is an expected"
+ " failure. Probably a web app is being migrated before the default"
+ " profile, and its profile directory was moved during the migration."
+ " Epiphany must be restarted with the new profile directory. The"
+ " migration will be run again.");
+ return FALSE;
+ }
+
if (ephy_profile_utils_set_migration_version (EPHY_PROFILE_MIGRATION_VERSION) != TRUE) {
LOG ("Failed to store the current migration version");
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]