mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
fix inout.c read/write mode bug.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user