Bug 611403 - Installing crashme-new.xpi fails to actually install [r=dtownsend a=blocking-fennec]

This commit is contained in:
Wesley Johnston 2011-01-06 10:27:55 -05:00
parent 839b79f904
commit a7f041b099

View File

@ -208,15 +208,26 @@ SafeMoveOperation.prototype = {
let entries = aDirectory.directoryEntries
.QueryInterface(Ci.nsIDirectoryEnumerator);
let cacheEntries = [];
try {
let entry;
while (entry = entries.nextFile)
this._moveDirEntry(entry, newDir);
cacheEntries.push(entry);
}
finally {
entries.close();
}
cacheEntries.forEach(function(aEntry) {
try {
this._moveDirEntry(aEntry, newDir);
}
catch (e) {
ERROR("Failed to move entry " + aEntry.path, e);
throw e;
}
}, this);
// The directory should be empty by this point. If it isn't this will throw
// and all of the operations will be rolled back
try {