(trunk) fix a nasty width truncation bug, reported by Eric in http://transmission.m0k.org/forum/viewtopic.php?t=2304&start=16

This commit is contained in:
Charles Kerr 2007-09-06 16:28:24 +00:00
parent 3cd185747c
commit 4b980c4c36
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ ensureMinimumFileSize ( const tr_torrent_t * tor,
ret = fd;
else if (fstat (fd, &sb) ) /* how big is the file? */
ret = tr_ioErrorFromErrno ();
else if ((size_t)sb.st_size >= minSize) /* already big enough */
else if (sb.st_size >= (off_t)minSize) /* already big enough */
ret = TR_OK;
else if (!ftruncate( fd, minSize )) /* grow it */
ret = TR_OK;