fixing hpux bustage, bug 239465, r=dbaron

This commit is contained in:
bryner%brianryner.com 2004-04-02 23:48:18 +00:00
Родитель 26ec7e821b
Коммит 3f83658858
1 изменённых файлов: 12 добавлений и 7 удалений

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

@ -893,10 +893,12 @@ nsLocalFile::Remove(PRBool recursive)
InvalidateCache();
if (isDir) {
if (recursive) {
nsCOMPtr<nsDirEnumeratorUnix> dir = new nsDirEnumeratorUnix();
nsDirEnumeratorUnix *dir = new nsDirEnumeratorUnix();
if (!dir)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr<nsISimpleEnumerator> dirRef(dir); // release on exit
rv = dir->Init(this, PR_FALSE);
if (NS_FAILED(rv))
return rv;
@ -1498,17 +1500,20 @@ nsLocalFile::SetFollowLinks(PRBool aFollowLinks)
NS_IMETHODIMP
nsLocalFile::GetDirectoryEntries(nsISimpleEnumerator **entries)
{
nsCOMPtr<nsDirEnumeratorUnix> dir = new nsDirEnumeratorUnix();
nsDirEnumeratorUnix *dir = new nsDirEnumeratorUnix();
if (!dir)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(dir);
nsresult rv = dir->Init(this, PR_FALSE);
if (NS_FAILED(rv))
return rv;
if (NS_FAILED(rv)) {
*entries = nsnull;
NS_RELEASE(dir);
} else {
*entries = dir; // transfer reference
}
/* QI needed? If not, need to ADDREF. */
return dir->QueryInterface(NS_GET_IID(nsISimpleEnumerator),
(void **)entries);
return rv;
}
NS_IMETHODIMP