Changeset 7776


Ignore:
Timestamp:
Jan 22, 2009, 10:04:37 PM (12 years ago)
Author:
charles
Message:

(1.5x) backport r7774 and r7775 (the unlink -> remove changes in libtransmission and gtk) in preparation for 1.50b3

Location:
branches/1.5x
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/gtk/add-dialog.c

    r7664 r7776  
    129129            if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( data->trash_check ) ) )
    130130
    131                 tr_file_trash_or_unlink( data->filename );
     131                tr_file_trash_or_remove( data->filename );
    132132            save_recent_destination( data->core, data->downloadDir );
    133133        }
  • branches/1.5x/gtk/tr-torrent.c

    r7694 r7776  
    213213        /* #1294: don't delete the source .torrent file if it's our internal copy */
    214214        if( !is_internal )
    215             tr_file_trash_or_unlink( source );
     215            tr_file_trash_or_remove( source );
    216216    }
    217217
     
    319319tr_torrent_delete_files( TrTorrent * gtor )
    320320{
    321     tr_torrentDeleteLocalData( tr_torrent_handle( gtor ), tr_file_trash_or_unlink );
     321    tr_torrentDeleteLocalData( tr_torrent_handle( gtor ), tr_file_trash_or_remove );
    322322}
    323323
  • branches/1.5x/gtk/util.c

    r7767 r7776  
    517517
    518518int
    519 tr_file_trash_or_unlink( const char * filename )
     519tr_file_trash_or_remove( const char * filename )
    520520{
    521521    if( filename && *filename )
     
    530530        g_clear_error( &err );
    531531        g_object_unref( G_OBJECT( file ) );
    532        
    533        
    534 #endif
    535         if( !trashed ) {
    536             if( g_unlink( filename ) ) {
    537                 const int err = errno;
    538                 g_message( "Unable to unlink file \"%s\": %s", filename, g_strerror( err ) );
    539             }
     532#endif
     533
     534        if( !trashed && g_remove( filename ) )
     535        {
     536            const int err = errno;
     537            g_message( "Unable to remove file \"%s\": %s", filename, g_strerror( err ) );
    540538        }
    541539    }
  • branches/1.5x/gtk/util.h

    r7664 r7776  
    133133gpointer    tr_object_ref_sink( gpointer object );
    134134
    135 int         tr_file_trash_or_unlink( const char * filename );
     135int         tr_file_trash_or_remove( const char * filename );
    136136
    137137#endif /* GTK_MAJOR_VERSION */
  • branches/1.5x/libtransmission/torrent.c

    r7722 r7776  
    18991899{
    19001900    if( fileFunc == NULL )
    1901         fileFunc = unlink;
     1901        fileFunc = remove;
    19021902
    19031903    /* close all the files because we're about to delete them */
Note: See TracChangeset for help on using the changeset viewer.