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
Родитель 91d35517ed
Коммит 515e0cc426
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -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 {