Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: adblockplus/issue-6108.patch

Issue 29626577: Issue 6108 - No filter list is selected after a migration failure (Closed)
Patch Set: Small adjustments Created Dec. 5, 2017, 3:51 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « adblockplus/build.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Issue 6108 - No filter list is selected after a migration failure
2
3 diff --git a/lib/filterStorage.js b/lib/filterStorage.js
4 --- a/lib/filterStorage.js
5 +++ b/lib/filterStorage.js
6 @@ -43,16 +43,18 @@ let formatVersion = 5;
7 let FilterStorage = exports.FilterStorage =
8 {
9 /**
10 * Will be set to true after the initial loadFromDisk() call completes.
11 * @type {boolean}
12 */
13 initialized: false,
14
15 + loadFromDiskFailed: false,
16 +
17 /**
18 * Version number of the patterns.ini format used.
19 * @type {number}
20 */
21 get formatVersion()
22 {
23 return formatVersion;
24 },
25 @@ -398,16 +400,17 @@ let FilterStorage = exports.FilterStorag
26 {
27 return this.restoreBackup(backupIndex, true).then(() =>
28 {
29 if (this.subscriptions.length == 0)
30 return tryBackup(backupIndex + 1);
31 }).catch(error =>
32 {
33 // Give up
34 + this.loadFromDiskFailed = true;
35 });
36 };
37
38 return IO.statFile(this.sourceFile).then(statData =>
39 {
40 if (!statData.exists)
41 {
42 this.firstRun = true;
OLDNEW
« no previous file with comments | « adblockplus/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld