Changeset 6279


Ignore:
Timestamp:
Jul 2, 2008, 12:51:04 AM (13 years ago)
Author:
charles
Message:

(gtk) #1035 prefrence "Remove source to trash" doesn't work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-torrent.c

    r6104 r6279  
    177177    tr_torrent * tor;
    178178    int errcode;
     179    uint8_t doTrash = FALSE;
    179180
    180181    errcode = -1;
    181182    *err = NULL;
    182183
     184    /* let the gtk client handle the removal, since libT
     185     * doesn't have any concept of the glib trash API */
     186    tr_ctorGetDeleteSource( ctor, &doTrash );
    183187    tr_ctorSetDeleteSource( ctor, FALSE );
    184188    tor = tr_torrentNew( handle, ctor, &errcode );
    185189
    186     if( tor )
    187     {
    188         uint8_t doTrash = FALSE;
    189         tr_ctorGetDeleteSource( ctor, &doTrash );
    190         if( doTrash )
    191             tr_file_trash_or_unlink( tr_ctorGetSourceFile( ctor ) );
    192     }
     190    if( tor && doTrash )
     191        tr_file_trash_or_unlink( tr_ctorGetSourceFile( ctor ) );
    193192 
    194193    if( !tor )
Note: See TracChangeset for help on using the changeset viewer.