| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus extension, | 2 * This file is part of the Adblock Plus extension, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 return new FakeFile(path); | 147 return new FakeFile(path); |
| 148 }, | 148 }, |
| 149 | 149 |
| 150 readFromFile: function(file, decode, listener, callback, timeLineID) | 150 readFromFile: function(file, decode, listener, callback, timeLineID) |
| 151 { | 151 { |
| 152 if ("spec" in file && /^defaults\b/.test(file.spec)) | 152 if ("spec" in file && /^defaults\b/.test(file.spec)) |
| 153 { | 153 { |
| 154 // Code attempts to read the default patterns.ini, we don't have that. | 154 // Code attempts to read the default patterns.ini, we don't have that. |
| 155 // Make sure to execute first-run actions instead. | 155 // Make sure to execute first-run actions instead. |
| 156 callback(null); | 156 callback(null); |
| 157 if (localStorage.currentVersion) |
| 158 seenDataCorruption = true; |
| 157 delete localStorage.currentVersion; | 159 delete localStorage.currentVersion; |
| 158 require("filterNotifier").FilterNotifier.triggerListeners("load"); | 160 require("filterNotifier").FilterNotifier.triggerListeners("load"); |
| 159 return; | 161 return; |
| 160 } | 162 } |
| 161 | 163 |
| 162 this._getFileEntry(file, false, function(fs, fileEntry) | 164 this._getFileEntry(file, false, function(fs, fileEntry) |
| 163 { | 165 { |
| 164 fileEntry.file(function(file) | 166 fileEntry.file(function(file) |
| 165 { | 167 { |
| 166 var reader = new FileReader(); | 168 var reader = new FileReader(); |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 status: -1, | 593 status: -1, |
| 592 notificationCallbacks: {}, | 594 notificationCallbacks: {}, |
| 593 loadFlags: 0, | 595 loadFlags: 0, |
| 594 INHIBIT_CACHING: 0, | 596 INHIBIT_CACHING: 0, |
| 595 VALIDATE_ALWAYS: 0, | 597 VALIDATE_ALWAYS: 0, |
| 596 QueryInterface: function() | 598 QueryInterface: function() |
| 597 { | 599 { |
| 598 return this; | 600 return this; |
| 599 } | 601 } |
| 600 }; | 602 }; |
| OLD | NEW |