[epiphany/gnome-3-32] 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/gnome-3-32] profile-migrator: fail migration if current profile dir is moved
- Date: Tue, 11 Jun 2019 22:30:47 +0000 (UTC)
commit 940f49e4f1eccb3954828af1b2c65663dd60a746
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 33a4f41ab..e28de03be 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -1416,6 +1416,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]