зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1722777 - Pre: Reuse existing directory iteration function when deleting folder content on Windows. r=nalexander
Depends on D140428 Differential Revision: https://phabricator.services.mozilla.com/D140910
This commit is contained in:
Родитель
9e17c0d135
Коммит
38f65972b7
|
@ -2315,14 +2315,9 @@ nsLocalFile::Remove(bool aRecursive) {
|
|||
return rv;
|
||||
}
|
||||
|
||||
bool more = false;
|
||||
while (NS_SUCCEEDED(dirEnum->HasMoreElements(&more)) && more) {
|
||||
nsCOMPtr<nsISupports> item;
|
||||
dirEnum->GetNext(getter_AddRefs(item));
|
||||
nsCOMPtr<nsIFile> file = do_QueryInterface(item);
|
||||
if (file) {
|
||||
file->Remove(aRecursive);
|
||||
}
|
||||
nsCOMPtr<nsIFile> file;
|
||||
while (NS_SUCCEEDED(dirEnum->GetNextFile(getter_AddRefs(file))) && file) {
|
||||
file->Remove(aRecursive);
|
||||
}
|
||||
}
|
||||
if (RemoveDirectoryW(mWorkingPath.get()) == 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче