mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1177541 - Remove warning if file is not found during deferred open. r=mcmanus
When doing a deferred open we should not emit a warning if the file is not found. The proper return code is still returned.
This commit is contained in:
parent
09eb59ac3d
commit
c7c7afa9ce
@ -202,6 +202,11 @@ nsresult
|
||||
nsFileStreamBase::Read(char* aBuf, uint32_t aCount, uint32_t* aResult)
|
||||
{
|
||||
nsresult rv = DoPendingOpen();
|
||||
if (rv == NS_ERROR_FILE_NOT_FOUND) {
|
||||
// Don't warn if this is just a deferred file not found.
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!mFD) {
|
||||
@ -489,6 +494,11 @@ NS_IMETHODIMP
|
||||
nsFileInputStream::Read(char* aBuf, uint32_t aCount, uint32_t* _retval)
|
||||
{
|
||||
nsresult rv = nsFileStreamBase::Read(aBuf, aCount, _retval);
|
||||
if (rv == NS_ERROR_FILE_NOT_FOUND) {
|
||||
// Don't warn if this is a deffered file not found.
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Check if we're at the end of file and need to close
|
||||
|
Loading…
Reference in New Issue
Block a user