mirror of
https://github.com/transmission/transmission
synced 2025-02-02 20:43:51 +00:00
fix inout.c read/write mode bug.
This commit is contained in:
parent
bdeefc99b1
commit
d8a6dd1e28
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue