diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-20 12:08:50 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-20 12:08:50 +0200 |
commit | a5dc179c3216156dd94ad0c32a9fd12162a95d1a (patch) | |
tree | e29bb8bb13df649814d1147129ab3969bde2879b /application/palemoon/components/migration/MigrationUtils.jsm | |
parent | 2b3b701187e144dad54d00927232ad2949b71b3c (diff) | |
download | UXP-a5dc179c3216156dd94ad0c32a9fd12162a95d1a.tar UXP-a5dc179c3216156dd94ad0c32a9fd12162a95d1a.tar.gz UXP-a5dc179c3216156dd94ad0c32a9fd12162a95d1a.tar.lz UXP-a5dc179c3216156dd94ad0c32a9fd12162a95d1a.tar.xz UXP-a5dc179c3216156dd94ad0c32a9fd12162a95d1a.zip |
Revert "[PALEMOON] Fix: The profile resseting - partially"
This reverts commit 4e7e4c2cbed8209974691f18180fa7ea8f00e785.
Diffstat (limited to 'application/palemoon/components/migration/MigrationUtils.jsm')
-rw-r--r-- | application/palemoon/components/migration/MigrationUtils.jsm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/application/palemoon/components/migration/MigrationUtils.jsm b/application/palemoon/components/migration/MigrationUtils.jsm index 243bf098a..4461b8af0 100644 --- a/application/palemoon/components/migration/MigrationUtils.jsm +++ b/application/palemoon/components/migration/MigrationUtils.jsm @@ -177,11 +177,12 @@ this.MigratorPrototype = { */ getMigrateData: function MP_getMigrateData(aProfile) { // Tycho: let types = [r.type for each (r in this._getMaybeCachedResources(aProfile))]; - let resources = this._getMaybeCachedResources(aProfile); - if (!resources) { - return []; + let types = []; + + for each (r in this._getMaybeCachedResources(aProfile)) { + types.push(r.type); } - let types = resources.map(r => r.type); + return types.reduce(function(a, b) a |= b, 0); }, @@ -196,10 +197,15 @@ 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 = resources.filter(r => aItems & r.type); - } + resources = []; + + for each (r in resources) { + if (aItems & r.type) { + resources.push(r); + } + } // Called either directly or through the bookmarks import callback. function doMigrate() { |