mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
fix a handful of console warnings that were generated by trying to trash a NULL .torrent file b/c the torrent had been added from a URL
This commit is contained in:
@@ -299,8 +299,12 @@ on_tree_view_button_released( GtkWidget * view,
|
||||
int
|
||||
gtr_file_trash_or_remove( const char * filename )
|
||||
{
|
||||
GFile * file;
|
||||
gboolean trashed = FALSE;
|
||||
GFile * file = g_file_new_for_path( filename );
|
||||
|
||||
g_return_val_if_fail (filename && *filename, 0);
|
||||
|
||||
file = g_file_new_for_path( filename );
|
||||
|
||||
if( gtr_pref_flag_get( PREF_KEY_TRASH_CAN_ENABLED ) ) {
|
||||
GError * err = NULL;
|
||||
|
||||
Reference in New Issue
Block a user