(trunk gtk) fix r9625 oops on adding torrents by their raw 40 character hex hashcode from the commandline in the GTK+ client
This commit is contained in:
parent
a38fb59c6f
commit
66880acfc7
|
@ -1103,7 +1103,7 @@ g_message( "filename [%s]", filename );
|
|||
{
|
||||
tr_core_add_from_url( core, filename );
|
||||
}
|
||||
else /* try it as a local file */
|
||||
else if( g_file_test( filename, G_FILE_TEST_EXISTS ) )
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@ -1116,6 +1116,10 @@ g_message( "filename [%s]", filename );
|
|||
if( err == TR_PARSE_ERR )
|
||||
tr_core_errsig( core, TR_PARSE_ERR, filename );
|
||||
}
|
||||
else if( gtr_is_hex_hashcode( filename ) )
|
||||
{
|
||||
tr_core_add_from_url( core, filename );
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -373,10 +373,11 @@ checkfilenames( int argc, char **argv )
|
|||
|
||||
if( g_file_test( filename, G_FILE_TEST_EXISTS ) )
|
||||
ret = g_slist_prepend( ret, filename );
|
||||
else if( gtr_is_hex_hashcode( filename ) )
|
||||
ret = g_slist_prepend( ret, filename );
|
||||
else
|
||||
else {
|
||||
if( gtr_is_hex_hashcode( argv[i] ) )
|
||||
ret = g_slist_prepend( ret, g_strdup( argv[i] ) );
|
||||
g_free( filename );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue