Changeset 2203


Ignore:
Timestamp:
Jun 26, 2007, 8:29:13 PM (15 years ago)
Author:
charles
Message:

push the destination directory into tr_torrentInit*()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/torrents.c

    r1912 r2203  
    498498    }
    499499
     500    if( dir == NULL )
     501        dir = gl_dir;
     502
    500503    if( NULL != path )
    501504    {
    502         tor->tor = tr_torrentInit( gl_handle, path, tor->hash,
     505        tor->tor = tr_torrentInit( gl_handle, path, dir,
     506                                   tor->hash,
    503507                                   TR_FLAG_SAVE, &errcode );
    504508    }
    505509    else if( NULL != hash )
    506510    {
    507         tor->tor = tr_torrentInitSaved( gl_handle, hash, 0, &errcode );
     511        tor->tor = tr_torrentInitSaved( gl_handle, hash, dir, 0, &errcode );
    508512    }
    509513    else
    510514    {
    511         tor->tor = tr_torrentInitData( gl_handle, data, size, tor->hash,
    512                                        TR_FLAG_SAVE, &errcode );
     515        tor->tor = tr_torrentInitData( gl_handle, data, size, dir,
     516                                       tor->hash, TR_FLAG_SAVE, &errcode );
    513517    }
    514518
     
    568572    memcpy( tor->hash, inf->hash, sizeof tor->hash );
    569573
    570     tr_torrentSetFolder( tor->tor, ( NULL == dir ? gl_dir : dir ) );
    571 
    572574    if( TR_FLAG_PRIVATE & inf->flags )
    573575    {
Note: See TracChangeset for help on using the changeset viewer.