1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 14:13:23 +00:00

(trunk cli) #3269 "transmission-cli 2.10 segfaults" -- r11330 wasn't the right fix. Thanks to Longinus00 for the proofreading.

This commit is contained in:
Charles Kerr 2010-10-18 03:11:51 +00:00
parent 0a323ac019
commit 4a05b4c3e6

View file

@ -232,14 +232,6 @@ main( int argc, char ** argv )
printf( "%s %s\n", MY_READABLE_NAME, LONG_VERSION_STRING );
/* the command line overrides defaults */
tr_bencInitDict( &settings, 0 );
if( parseCommandLine( &settings, argc, (const char**)argv ) )
return EXIT_FAILURE;
if( showVersion )
return 0;
/* user needs to pass in at least one argument */
if( argc < 2 ) {
tr_getopt_usage( MY_READABLE_NAME, getUsage( ), options );
@ -247,9 +239,17 @@ main( int argc, char ** argv )
}
/* load the defaults from config file + libtransmission defaults */
tr_bencInitDict( &settings, 0 );
configDir = getConfigDir( argc, (const char**)argv );
tr_sessionLoadSettings( &settings, configDir, MY_CONFIG_NAME );
/* the command line overrides defaults */
if( parseCommandLine( &settings, argc, (const char**)argv ) )
return EXIT_FAILURE;
if( showVersion )
return 0;
/* Check the options for validity */
if( !torrentPath ) {
fprintf( stderr, "No torrent specified!\n" );