mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
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:
parent
9e17c0d135
commit
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user