mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 11:22:38 -04:00
+ bug fix in argument parsing
This commit is contained in:
parent
2d5f4350eb
commit
3efd819625
@ -275,7 +275,6 @@ int main(int argc, char **argv) {
|
|||||||
if (c != -1) {
|
if (c != -1) {
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
daemonFlag = true;
|
daemonFlag = true;
|
||||||
break;
|
break;
|
||||||
@ -291,13 +290,12 @@ int main(int argc, char **argv) {
|
|||||||
case 'p':
|
case 'p':
|
||||||
serverPort = atoi(optarg);
|
serverPort = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (optind < argc) {
|
if (optind < argc) {
|
||||||
zimPath = argv[optind++];
|
zimPath = argv[optind++];
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user