1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-12 17:34:40 +00:00

(trunk cli) #3487 "transmissioncli should warn about about unrecognized commands" -- fixed.

This commit is contained in:
Charles Kerr 2010-08-04 23:18:39 +00:00
parent 4cc11e47ee
commit 807c5de5e2

View file

@ -265,6 +265,12 @@ main( int argc, char ** argv )
tr_webRun( h, torrentPath, NULL, onTorrentFileDownloaded, ctor );
waitingOnWeb = TRUE;
while( waitingOnWeb ) tr_wait_msec( 1000 );
} else {
fprintf( stderr, "ERROR: Unrecognized torrent \"%s\".\n", torrentPath );
fprintf( stderr, " * If you're trying to create a torrent, use transmission-create.\n" );
fprintf( stderr, " * If you're trying to see a torrent's info, use transmission-show.\n" );
tr_sessionClose( h );
return EXIT_FAILURE;
}
tr_free( fileContents );
@ -394,7 +400,8 @@ parseCommandLine( tr_benc * d, int argc, const char ** argv )
case 912: tr_bencDictAddInt( d, TR_PREFS_KEY_ENCRYPTION, TR_CLEAR_PREFERRED );
break;
case TR_OPT_UNK:
torrentPath = optarg;
if( torrentPath == NULL )
torrentPath = optarg;
break;
default: return 1;
}