Changeset 6301 for trunk/gtk/tr-core.c


Ignore:
Timestamp:
Jul 8, 2008, 9:08:20 PM (14 years ago)
Author:
charles
Message:

(gtk) partial fix for #562: No error message when opening broken torrent file

File:
1 edited

Legend:

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

    r6288 r6301  
    770770    if( filename && handle )
    771771    {
     772        int err;
    772773        tr_ctor * ctor = tr_ctorNew( handle );
    773774        tr_core_apply_defaults( ctor );
    774775        tr_ctorSetPaused( ctor, TR_FORCE, !doStart );
    775         if( tr_ctorSetMetainfoFromFile( ctor, filename ) )
     776        if( tr_ctorSetMetainfoFromFile( ctor, filename ) ) {
     777            addTorrentErrorDialog( NULL, TR_EINVALID, filename );
    776778            tr_ctorFree( ctor );
    777         else if( tr_torrentParse( handle, ctor, NULL ) )
     779        } else if(( err = tr_torrentParse( handle, ctor, NULL ))) {
     780            addTorrentErrorDialog( NULL, err, filename );
    778781            tr_ctorFree( ctor );
    779         else if( doPrompt )
     782        } else if( doPrompt )
    780783            g_signal_emit( core, TR_CORE_GET_CLASS(core)->promptsig, 0, ctor );
    781784        else
Note: See TracChangeset for help on using the changeset viewer.