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

Side by Side Diff: lib/filesystem/io.js

Issue 13077005: Fix first-run page in Opera (Closed)
Patch Set: Fixed nits Created Oct. 16, 2013, 1:43 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 | « .hgsubstate ('k') | lib/localstorage/io.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 { 47 {
48 return new FakeFile(path); 48 return new FakeFile(path);
49 }, 49 },
50 50
51 readFromFile: function(file, decode, listener, callback, timeLineID) 51 readFromFile: function(file, decode, listener, callback, timeLineID)
52 { 52 {
53 if ("spec" in file && /^defaults\b/.test(file.spec)) 53 if ("spec" in file && /^defaults\b/.test(file.spec))
54 { 54 {
55 // Code attempts to read the default patterns.ini, we don't have that. 55 // Code attempts to read the default patterns.ini, we don't have that.
56 // Make sure to execute first-run actions instead. 56 // Make sure to execute first-run actions instead.
57 callback(null);
58 if (localStorage.currentVersion) 57 if (localStorage.currentVersion)
59 seenDataCorruption = true; 58 seenDataCorruption = true;
60 delete localStorage.currentVersion; 59 delete localStorage.currentVersion;
60 callback(null);
61 return; 61 return;
62 } 62 }
63 63
64 this._getFileEntry(file, false, function(fs, fileEntry) 64 this._getFileEntry(file, false, function(fs, fileEntry)
65 { 65 {
66 fileEntry.file(function(file) 66 fileEntry.file(function(file)
67 { 67 {
68 var reader = new FileReader(); 68 var reader = new FileReader();
69 reader.onloadend = function() 69 reader.onloadend = function()
70 { 70 {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 callback(null, { 176 callback(null, {
177 exists: true, 177 exists: true,
178 isDirectory: fileEntry.isDirectory, 178 isDirectory: fileEntry.isDirectory,
179 isFile: fileEntry.isFile, 179 isFile: fileEntry.isFile,
180 lastModified: metadata.modificationTime.getTime() 180 lastModified: metadata.modificationTime.getTime()
181 }); 181 });
182 }, callback); 182 }, callback);
183 }, callback); 183 }, callback);
184 } 184 }
185 }; 185 };
OLDNEW
« no previous file with comments | « .hgsubstate ('k') | lib/localstorage/io.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld