1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-22 22:20:39 +00:00

(trunk gtk) #3239 "move .torrent files to trash" not working when .torrent added via dbus

This commit is contained in:
Charles Kerr 2010-05-29 16:12:42 +00:00
parent 6ea50f14ec
commit 6ed4d1d87d

View file

@ -571,9 +571,18 @@ main( int argc, char ** argv )
* if that goes well, then our work is done. */ * if that goes well, then our work is done. */
GSList * l; GSList * l;
gboolean delegated = FALSE; gboolean delegated = FALSE;
const gboolean trash_originals = pref_flag_get( TR_PREFS_KEY_TRASH_ORIGINAL );
for( l = argfiles; l; l = l->next ) for( l=argfiles; l!=NULL; l=l->next )
delegated |= gtr_dbus_add_torrent( l->data ); {
const char * filename = l->data;
const gboolean added = gtr_dbus_add_torrent( filename );
if( added && trash_originals )
gtr_file_trash_or_remove( filename );
delegated |= added;
}
if( delegated ) { if( delegated ) {
g_slist_foreach( argfiles, (GFunc)g_free, NULL ); g_slist_foreach( argfiles, (GFunc)g_free, NULL );