I'm developing a Chrome App which uses HTML5 FileSystem with persistent storage, my data was lost after chrome get restarted, I tested several times, 9 times out of 10 data lost after restart, I have fired an issue on Chromium site, I want to know if there is workaround or something I did mistake. here is my code:
window.webkitRequestFileSystem(window.PERSISTENT, 120*1024*1024, function(fs) {
function gotFileEntry(fileEntry) {
fileEntry.createWriter(gotFileWriter, fail);
}
function gotFileWriter(writer) {
writer.onwriteend = function(evt) {
done && done();
};
writer.write(blob);
}
fs.root.getFile(path, {create: true, exclusive: false}, gotFileEntry, fail);
}, fail);
I found a similar question some guy had asked, but I am sure I set quota(120M) big enough.
This problem is for Chrome App, for Legacy packaged app, no problem.
UPDATE:
Chrome team has confirmed this problem, the patch will land on Chrome 37.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…