1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-03 04:53:27 +00:00

fix inout.c read/write mode bug.

This commit is contained in:
Charles Kerr 2007-07-06 17:19:34 +00:00
parent bdeefc99b1
commit d8a6dd1e28

View file

@ -43,7 +43,7 @@ readOrWriteBytes ( const tr_torrent_t * tor,
if( !file->length )
return 0;
else if ((fd = tr_fdFileOpen ( tor->destination, file->name, TRUE )) < 0)
else if ((fd = tr_fdFileOpen ( tor->destination, file->name, ioMode==TR_IO_WRITE )) < 0)
ret = fd;
else if( lseek( fd, (off_t)fileOffset, SEEK_SET ) == ((off_t)-1) )
ret = TR_ERROR_IO_OTHER;