[Box Backup-dev] Problems with command line parsing in bbackupctl when using the force-sync option [Chris version of Box Backup]

Mark boxbackup-dev@fluffy.co.uk
Fri, 24 Feb 2006 14:29:21 +0100


When I execute bbackupctl on Windows XP with the sync option, everything 
works fine, but when I use the force-sync option I get an acces 
violation which I could trace back to the code in emu.h.

The function getopt(..) parses the first command line option -c perfect, 
but when it needs to parse the next option (which isn't there!) it fails 
at the instruction str = args[optind]; on line 225. This is because 
args[4] doesn't exist (it's a null pointer).

I think this problem is caused by the fact that the command line is 
searched for combinations of - and a letter, which goes wrong with 
force-sync, because there is a dash in it too.

Maybe I am wrong, but I do know that I can't do a force sync rigth now, 
and I don't know what to fix.

Does anybody know a fix for this problem?

Mark