mirror of
https://github.com/transmission/transmission
synced 2025-02-22 22:20:39 +00:00
(gtk) #1035 prefrence "Remove source to trash" doesn't work
This commit is contained in:
parent
435cbaf6b4
commit
4e0becaa57
1 changed files with 6 additions and 7 deletions
|
@ -176,20 +176,19 @@ tr_torrent_new_ctor( tr_handle * handle,
|
|||
{
|
||||
tr_torrent * tor;
|
||||
int errcode;
|
||||
uint8_t doTrash = FALSE;
|
||||
|
||||
errcode = -1;
|
||||
*err = NULL;
|
||||
|
||||
/* let the gtk client handle the removal, since libT
|
||||
* doesn't have any concept of the glib trash API */
|
||||
tr_ctorGetDeleteSource( ctor, &doTrash );
|
||||
tr_ctorSetDeleteSource( ctor, FALSE );
|
||||
tor = tr_torrentNew( handle, ctor, &errcode );
|
||||
|
||||
if( tor )
|
||||
{
|
||||
uint8_t doTrash = FALSE;
|
||||
tr_ctorGetDeleteSource( ctor, &doTrash );
|
||||
if( doTrash )
|
||||
tr_file_trash_or_unlink( tr_ctorGetSourceFile( ctor ) );
|
||||
}
|
||||
if( tor && doTrash )
|
||||
tr_file_trash_or_unlink( tr_ctorGetSourceFile( ctor ) );
|
||||
|
||||
if( !tor )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue