diff --git a/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp b/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp index 9491df4bdc8..43c290aebeb 100644 --- a/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp +++ b/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp @@ -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; diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp index 09fcab9030a..a2d6ad73d0a 100644 --- a/mozilla/xpcom/io/nsLocalFileUnix.cpp +++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp @@ -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; }