(trunk libT) #2885 "'Move data file' does not change the location for data yet to be downloaded" -- fixed in trunk for 1.92

This commit is contained in:
Charles Kerr 2010-03-06 22:33:45 +00:00
parent d54e894ccb
commit d83f8e09d3
2 changed files with 14 additions and 1 deletions

View File

@ -2544,6 +2544,13 @@ setLocation( void * vdata )
}
}
if( !err && do_move )
{
tr_free( tor->incompleteDir );
tor->incompleteDir = NULL;
tor->currentDir = tor->downloadDir;
}
if( data->setme_state )
*data->setme_state = err ? TR_LOC_ERROR : TR_LOC_DONE;

View File

@ -1041,7 +1041,13 @@ enum
TR_LOC_ERROR
};
/** @brief Tell transmsision where to find this torrent's local data */
/**
* @brief Tell transmsision where to find this torrent's local data.
*
* if move_from_previous_location is `true', the torrent's incompleteDir
* will be clobberred s.t. additional files being added will be saved
* to the torrent's downloadDir.
*/
void tr_torrentSetLocation( tr_torrent * torrent,
const char * location,
tr_bool move_from_previous_location,