diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-05-24 15:32:18 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-06-11 17:29:48 -0500 |
commit | 940f49e4f1eccb3954828af1b2c65663dd60a746 (patch) | |
tree | 1fc99bfefea322666a9a7701818f2b191a09f424 | |
parent | 412e27b5045463fd8aa60a7413e3ade2b072f43b (diff) | |
download | epiphany-940f49e4f1eccb3954828af1b2c65663dd60a746.tar.gz |
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.
-rw-r--r-- | src/profile-migrator/ephy-profile-migrator.c | 9 |
1 files changed, 9 insertions, 0 deletions
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; |