(trunk libT) possible fix for gn0s1s' "file not found" error message

This commit is contained in:
Charles Kerr 2010-01-26 21:41:40 +00:00
parent 6e8cc99374
commit 9c0900eb20
1 changed files with 2 additions and 1 deletions

View File

@ -240,7 +240,8 @@ readOrWritePiece( tr_torrent * tor,
++fileIndex;
fileOffset = 0;
if( err ) {
if( ( err != 0 ) && (ioMode == TR_IO_WRITE ) )
{
char * path = tr_buildPath( tor->downloadDir, file->name, NULL );
tr_torrentSetLocalError( tor, "%s (%s)", tr_strerror( err ), path );
tr_free( path );