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 git-svn-id: svn://10.0.0.236/trunk@111039 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
12243f1699
commit
c0aa10d601
@ -560,8 +560,9 @@ RDFXMLDataSourceImpl::BlockingParse(nsIURI* aURL, nsIStreamListener* aConsumer)
|
||||
PRUint32 sourceOffset = 0;
|
||||
rv = channel->Open(&in);
|
||||
|
||||
// If we couldn't open the channel, then just return.
|
||||
if (NS_FAILED(rv)) return NS_OK;
|
||||
// Report success if the file doesn't exist, but propagate other errors.
|
||||
if (rv == NS_ERROR_FILE_NOT_FOUND) return NS_OK;
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
NS_ASSERTION(in != nsnull, "no input stream");
|
||||
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);
|
||||
if (! *_retval)
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_ErrorAccordingToNSPR();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user