wmail: change "!stat(...) == 0" to "stat(...) == -1"

This commit is contained in:
Jeremy Sowden 2019-06-07 09:52:25 +01:00 committed by Carlos R. Mafra
parent 51fc232cdb
commit 07f158ad7e

View file

@ -681,7 +681,7 @@ static void CheckMaildir( void )
break; break;
} }
if( !stat( fullName, &fileStat ) == 0 ) if( stat( fullName, &fileStat ) == -1 )
WARNING( "Can't stat file/path \"%s\"\n", fullName ); WARNING( "Can't stat file/path \"%s\"\n", fullName );
else if( S_ISDIR( fileStat.st_mode )) else if( S_ISDIR( fileStat.st_mode ))
{ {
@ -729,7 +729,7 @@ static int TraverseDirectory( const char *name, bool isNewMail )
break; break;
} }
if( !stat( fullName, &fileStat ) == 0 ) if( stat( fullName, &fileStat ) == -1 )
WARNING( "Can't stat file/path \"%s\"\n", fullName ); WARNING( "Can't stat file/path \"%s\"\n", fullName );
else if( !S_ISDIR( fileStat.st_mode )) else if( !S_ISDIR( fileStat.st_mode ))
{ {