diff options
author | Xan Lopez <xan@gnome.org> | 2009-09-14 15:43:39 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-09-14 15:44:02 +0800 |
commit | 5e8dbdfc44572177fec1801e0e4c5380df5b0e6e (patch) | |
tree | 2429f09bf612d94ada835c89035b9b8c00de4768 /src | |
parent | b6748240a7313453c492bc18c4fc8f3397f3e0ad (diff) | |
download | gsoc2013-epiphany-5e8dbdfc44572177fec1801e0e4c5380df5b0e6e.tar.gz gsoc2013-epiphany-5e8dbdfc44572177fec1801e0e4c5380df5b0e6e.tar.zst gsoc2013-epiphany-5e8dbdfc44572177fec1801e0e4c5380df5b0e6e.zip |
ephy-profile-migration.c: repeat password migration when needed
The previous version had some bugs in it, so run it again for users
that had already migrated their profile.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-profile-migration.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ephy-profile-migration.c b/src/ephy-profile-migration.c index 83089158f..c0c319d04 100644 --- a/src/ephy-profile-migration.c +++ b/src/ephy-profile-migration.c @@ -47,7 +47,7 @@ * - Add your function at the end of the 'migrators' array */ -#define PROFILE_MIGRATION_VERSION 2 +#define PROFILE_MIGRATION_VERSION 3 typedef void (*EphyProfileMigrator) (void); @@ -352,6 +352,9 @@ migrate_passwords () const EphyProfileMigrator migrators[] = { migrate_cookies, + migrate_passwords, + /* Yes, again! Version 2 had some bugs, so we need to run + migrate_passwords again to possibly migrate more passwords*/ migrate_passwords }; @@ -385,7 +388,16 @@ _ephy_profile_migrate () latest = 0; for (i = latest; i < PROFILE_MIGRATION_VERSION; i++) { - EphyProfileMigrator m = migrators[i]; + EphyProfileMigrator m; + + /* No need to run the password migration twice in a row. It + appears twice in the list for the benefit of people that were + using the development snapshots, since an early version didn't + migrate all passwords correctly. */ + if (i == 1) + continue; + + m = migrators[i]; m(); } |