diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-20 08:28:12 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-20 08:28:12 +0200 |
commit | 4e7e4c2cbed8209974691f18180fa7ea8f00e785 (patch) | |
tree | e819b05bad4189d06a0ab87626a010e93849e0a0 /application/palemoon/components/migration/MigrationUtils.jsm | |
parent | 8b960b23ac31d4dd0763f91ab5f494251467eeb1 (diff) | |
download | UXP-4e7e4c2cbed8209974691f18180fa7ea8f00e785.tar UXP-4e7e4c2cbed8209974691f18180fa7ea8f00e785.tar.gz UXP-4e7e4c2cbed8209974691f18180fa7ea8f00e785.tar.lz UXP-4e7e4c2cbed8209974691f18180fa7ea8f00e785.tar.xz UXP-4e7e4c2cbed8209974691f18180fa7ea8f00e785.zip |
[PALEMOON] Fix: The profile resseting - partially
https://github.com/MoonchildProductions/UXP/commit/aaf3409c46a5e472bc539a6ad5902f886c980e1f
- Revert migration
- Partially
- no manual migration from Places
- no migration from other browsers
- no the cmd `-migration`
- Fix migration files (`// Tycho:`)
- Something in the last commit (a typo)
Diffstat (limited to 'application/palemoon/components/migration/MigrationUtils.jsm')
-rw-r--r-- | application/palemoon/components/migration/MigrationUtils.jsm | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/application/palemoon/components/migration/MigrationUtils.jsm b/application/palemoon/components/migration/MigrationUtils.jsm index 4461b8af0..243bf098a 100644 --- a/application/palemoon/components/migration/MigrationUtils.jsm +++ b/application/palemoon/components/migration/MigrationUtils.jsm @@ -177,12 +177,11 @@ this.MigratorPrototype = { */ getMigrateData: function MP_getMigrateData(aProfile) { // Tycho: let types = [r.type for each (r in this._getMaybeCachedResources(aProfile))]; - let types = []; - - for each (r in this._getMaybeCachedResources(aProfile)) { - types.push(r.type); + let resources = this._getMaybeCachedResources(aProfile); + if (!resources) { + return []; } - + let types = resources.map(r => r.type); return types.reduce(function(a, b) a |= b, 0); }, @@ -197,15 +196,10 @@ this.MigratorPrototype = { if (resources.length == 0) throw new Error("migrate called for a non-existent source"); - if (aItems != Ci.nsIBrowserProfileMigrator.ALL) + if (aItems != Ci.nsIBrowserProfileMigrator.ALL) { // Tycho: resources = [r for each (r in resources) if (aItems & r.type)]; - resources = []; - - for each (r in resources) { - if (aItems & r.type) { - resources.push(r); - } - } + resources = resources.filter(r => aItems & r.type); + } // Called either directly or through the bookmarks import callback. function doMigrate() { |