replaced unlink() & _unlink() with more standard remove() (ticket #334)

This commit is contained in:
Vadim Pisarevsky
2010-07-17 11:51:17 +00:00
parent 1d93ca00de
commit f894d1de31
4 changed files with 8 additions and 12 deletions

View File

@@ -332,7 +332,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
if( !decoder->readHeader() )
{
if( filename )
unlink(filename);
remove(filename);
return 0;
}
@@ -374,7 +374,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
bool code = decoder->readData( *data );
if( filename )
unlink(filename);
remove(filename);
if( !code )
{
@@ -441,7 +441,7 @@ bool imencode( const string& ext, const Mat& image,
fseek( f, 0, SEEK_SET );
buf.resize(fread( &buf[0], 1, buf.size(), f ));
fclose(f);
unlink(filename);
remove(filename);
}
return code;
}