Changeset 9628


Ignore:
Timestamp:
Nov 29, 2009, 8:29:57 AM (12 years ago)
Author:
charles
Message:

(trunk gtk) fix r9625 oops on adding torrents by their raw 40 character hex hashcode from the commandline in the GTK+ client

Location:
trunk/gtk
Files:
2 edited

Legend:

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

    r9625 r9628  
    11041104        tr_core_add_from_url( core, filename );
    11051105    }
    1106     else /* try it as a local file */
     1106    else if( g_file_test( filename, G_FILE_TEST_EXISTS ) )
    11071107    {
    11081108        int err;
     
    11161116        if( err == TR_PARSE_ERR )
    11171117            tr_core_errsig( core, TR_PARSE_ERR, filename );
     1118    }
     1119    else if( gtr_is_hex_hashcode( filename ) )
     1120    {
     1121        tr_core_add_from_url( core, filename );
    11181122    }
    11191123}
  • trunk/gtk/util.c

    r9625 r9628  
    374374            if( g_file_test( filename, G_FILE_TEST_EXISTS ) )
    375375                ret = g_slist_prepend( ret, filename );
    376             else if( gtr_is_hex_hashcode( filename ) )
    377                 ret = g_slist_prepend( ret, filename );
    378             else
     376            else {
     377                if( gtr_is_hex_hashcode( argv[i] ) )
     378                    ret = g_slist_prepend( ret, g_strdup( argv[i] ) );
    379379                g_free( filename );
     380            }
    380381        }
    381382    }
Note: See TracChangeset for help on using the changeset viewer.