From 833c9977828917ca0f8a5c37cc2cd132f368e7f8 Mon Sep 17 00:00:00 2001 From: Kelson Date: Sun, 1 Mar 2020 15:36:31 +0100 Subject: [PATCH 1/3] Remove usell origId option parsing --- src/manager/kiwix-manage.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/manager/kiwix-manage.cpp b/src/manager/kiwix-manage.cpp index 5b0334b..270fe19 100644 --- a/src/manager/kiwix-manage.cpp +++ b/src/manager/kiwix-manage.cpp @@ -119,7 +119,6 @@ int handle_add(kiwix::Library* library, const std::string& libraryPath, string zimPath; string zimPathToSave = "."; string url; - string origID = ""; int option_index = 0; int c = 0; int resultCode = 0; @@ -133,7 +132,6 @@ int handle_add(kiwix::Library* library, const std::string& libraryPath, optind = 3; static struct option long_options[] = { {"url", required_argument, 0, 'u'}, - {"origId", required_argument, 0, 'o'}, {"zimPathToSave", required_argument, 0, 'z'}, {0, 0, 0, 0} }; @@ -149,9 +147,6 @@ int handle_add(kiwix::Library* library, const std::string& libraryPath, case 'u': url = optarg; break; - case 'o': - origID = optarg; - break; case 'z': zimPathToSave = optarg; break; From d572bf875d0f4712cd3d080c04a9364fd1126d2f Mon Sep 17 00:00:00 2001 From: Kelson Date: Sun, 1 Mar 2020 15:42:44 +0100 Subject: [PATCH 2/3] Better --version argument parsing --- src/manager/kiwix-manage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manager/kiwix-manage.cpp b/src/manager/kiwix-manage.cpp index 270fe19..14dd2a0 100644 --- a/src/manager/kiwix-manage.cpp +++ b/src/manager/kiwix-manage.cpp @@ -223,7 +223,7 @@ int main(int argc, char** argv) int option_index = 0; int c; - while (true) { + while (true && argc == 2) { c = getopt_long(argc, argv, "v", long_options, &option_index); if (c == -1) break; From 83427af3d275a404de8e45dfbb129d28c519bf2f Mon Sep 17 00:00:00 2001 From: Kelson Date: Sun, 1 Mar 2020 15:45:31 +0100 Subject: [PATCH 3/3] Update Changelog --- Changelog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Changelog b/Changelog index a62b0b3..66dde2a 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,8 @@ +kiwix-tools 3.0.3 +================= + + * [MANAGER] Fix broken --version argument parsin + kiwix-tools 3.0.2 =================