Don't attempt to read from the file we are sending unless the file stream is in fact open.

This commit is contained in:
mscott%netscape.com 1999-06-16 02:19:49 +00:00
Родитель 7a90886028
Коммит 0124f4b62b
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -1010,7 +1010,7 @@ PRInt32 nsSmtpProtocol::SendMessageInFile()
if (filePath && *filePath)
{
nsInputFileStream * fileStream = new nsInputFileStream(nsFileSpec(*filePath), PR_RDONLY, 00700);
if (fileStream)
if (fileStream && fileStream->is_open())
{
PRInt32 amtInBuffer = 0;
PRBool lastLineWasComplete = PR_TRUE;