rayantony / torchat

Automatically exported from code.google.com/p/torchat
0 stars 0 forks source link

wrong handling of command line arguments #94

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I tried to check the command line arguments of torchat with "torchat --help". 
This not only not show any helpful information, but it created the new data 
directory "/home/username/.torchat_--help". Additionally the main window of 
torchat is called "TorChat: --help - 0000000000000000".

I did some testing and torchat always takes the first command line argument and 
adds it to the name of the used data directory, additional command line 
arguments are ignored.
So starting torchat with "torchat --help", "torchat --help more" or "torchat 
--help more arguments" always results in using 
"/home/username/.torchat_--help", even though torchat recognises them all by 
printing "command line arguments: --help more arguments".

Not changing the name of the data directory would be the critical fix, 
supporting the command line argument "--help" is favourable but not that 
important.

Original issue reported on code.google.com by kdg83...@trash-mail.com on 18 Jan 2011 at 4:14

GoogleCodeExporter commented 9 years ago
this is meant to start it with different identities. Its only of limited use so 
far since you still have to manually change the port numbers after the new 
identity is created to avoid conflicts but once this configuration is done you 
can start two or more torchat instances with different identities.

The correct fix would be to not interpret arguments that starts with "-" as the 
identity name, to simply ignore them.

Original comment by prof7...@gmail.com on 18 Jan 2011 at 12:11

GoogleCodeExporter commented 9 years ago
I understand. But to me an even better option would be to start it with 
different identities only after triggered by a certain command line argument. 
For example "torchat -i other_identity".

Original comment by kdg83...@trash-mail.com on 18 Jan 2011 at 12:42

GoogleCodeExporter commented 9 years ago
This is actually a good idea!

Since almost nobody is using this feature yet I can still change it.

Original comment by prof7...@gmail.com on 18 Jan 2011 at 12:47