+ bug fix in argument parsing

This commit is contained in:
kelson42 2010-03-18 21:31:24 +00:00
parent 2d5f4350eb
commit 3efd819625

View File

@ -275,29 +275,27 @@ int main(int argc, char **argv) {
if (c != -1) { if (c != -1) {
switch (c) { switch (c) {
case 'd':
daemonFlag = true;
break;
case 'd': case 'v':
daemonFlag = true; verboseFlag = true;
break; break;
case 'v': case 'i':
verboseFlag = true; indexPath = optarg;
break; break;
case 'i':
indexPath = optarg;
break;
case 'p':
serverPort = atoi(optarg);
break;
case 'p':
serverPort = atoi(optarg);
break;
} }
} else { } else {
if (optind < argc) { if (optind < argc) {
zimPath = argv[optind++]; zimPath = argv[optind++];
break;
} }
break;
} }
} }