зеркало из https://github.com/mozilla/pjs.git
Bug 611403 - Installing crashme-new.xpi fails to actually install [r=dtownsend a=blocking-fennec]
This commit is contained in:
Родитель
91d35517ed
Коммит
515e0cc426
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче