(trunk libT) fix downloadDir error reported & tracked down by wereHamster
This commit is contained in:
parent
a1b2af981c
commit
b545dbe28a
|
@ -434,11 +434,12 @@ torrentRealInit( tr_session * session,
|
|||
tr_torrent * tor,
|
||||
const tr_ctor * ctor )
|
||||
{
|
||||
int doStart;
|
||||
uint64_t loaded;
|
||||
uint64_t t;
|
||||
tr_info * info = &tor->info;
|
||||
static int nextUniqueId = 1;
|
||||
int doStart;
|
||||
uint64_t loaded;
|
||||
uint64_t t;
|
||||
const char * dir;
|
||||
static int nextUniqueId = 1;
|
||||
tr_info * info = &tor->info;
|
||||
|
||||
tr_globalLock( session );
|
||||
|
||||
|
@ -451,6 +452,10 @@ torrentRealInit( tr_session * session,
|
|||
|
||||
tor->blockSize = getBlockSize( info->pieceSize );
|
||||
|
||||
if( !tr_ctorGetDownloadDir( ctor, TR_FORCE, &dir ) ||
|
||||
!tr_ctorGetDownloadDir( ctor, TR_FALLBACK, &dir ) )
|
||||
tor->downloadDir = tr_strdup( dir );
|
||||
|
||||
tor->lastPieceSize = info->totalSize % info->pieceSize;
|
||||
|
||||
if( !tor->lastPieceSize )
|
||||
|
|
Loading…
Reference in New Issue