bug 100132: clean up over-zealous error masking in

nsRDFXMLDataSource::BlockingParse(), and bring nsLocalFileUnix's
OpenNSPRFileDesc() return values in line with other platforms.
r=waterson, sr=brendan
This commit is contained in:
tingley%sundell.net 2001-12-22 19:08:48 +00:00
Родитель b43af52bb2
Коммит 710766a6f6
2 изменённых файлов: 4 добавлений и 3 удалений

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

@ -560,8 +560,9 @@ RDFXMLDataSourceImpl::BlockingParse(nsIURI* aURL, nsIStreamListener* aConsumer)
PRUint32 sourceOffset = 0; PRUint32 sourceOffset = 0;
rv = channel->Open(&in); rv = channel->Open(&in);
// If we couldn't open the channel, then just return. // Report success if the file doesn't exist, but propagate other errors.
if (NS_FAILED(rv)) return NS_OK; if (rv == NS_ERROR_FILE_NOT_FOUND) return NS_OK;
if (NS_FAILED(rv)) return rv;
NS_ASSERTION(in != nsnull, "no input stream"); NS_ASSERTION(in != nsnull, "no input stream");
if (! in) return NS_ERROR_FAILURE; if (! in) return NS_ERROR_FAILURE;

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

@ -350,7 +350,7 @@ nsLocalFile::OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc **_retval)
*_retval = PR_Open(mPath.get(), flags, mode); *_retval = PR_Open(mPath.get(), flags, mode);
if (! *_retval) if (! *_retval)
return NS_ERROR_FAILURE; return NS_ErrorAccordingToNSPR();
return NS_OK; return NS_OK;
} }