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

Unified Diff: chrome/ext/background.js

Issue 5957502386569216: Issue 2021 - Fixed deletion of migrated files from the FileSystem API (Closed)
Patch Set: Created April 21, 2015, 1:56 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -589,7 +589,21 @@
},
function()
{
- fs.root.removeRecursively(callback, callback);
+ fs.root.createReader().readEntries(function(entries)
+ {
+ var emptyFunc = function() {};
+
+ for (var i = 0; i < entries.length; i++)
+ {
+ var entry = entries[i];
+ if (entry.isDirectory)
+ entry.removeRecursively(emptyFunc, emptyFunc);
+ else
+ entry.remove(emptyFunc, emptyFunc);
+ }
+ });
+
+ callback();
}
);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld