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:
parent
4cc11e47ee
commit
807c5de5e2
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue