Bug 681407 - crash nsLocalFile::CopyMove

This commit is contained in:
Michal Novotny 2011-10-19 13:02:57 +02:00
parent e2b3265b60
commit 05beb01b45
2 changed files with 4 additions and 0 deletions

View File

@ -1557,6 +1557,8 @@ nsLocalFile::CopyMove(nsIFile *aParentDir, const nsACString &newName, bool move)
nsCOMPtr<nsISimpleEnumerator> targetIterator;
rv = target->GetDirectoryEntries(getter_AddRefs(targetIterator));
if (NS_FAILED(rv))
return rv;
bool more;
targetIterator->HasMoreElements(&more);

View File

@ -1650,6 +1650,8 @@ nsLocalFile::CopyMove(nsIFile *aParentDir, const nsAString &newName, bool follow
nsCOMPtr<nsISimpleEnumerator> targetIterator;
rv = target->GetDirectoryEntries(getter_AddRefs(targetIterator));
if (NS_FAILED(rv))
return rv;
bool more;
targetIterator->HasMoreElements(&more);