OLD | NEW |
| (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; | |
OLD | NEW |