You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2020/09/09 14:01:24 UTC
[tika] 05/06: Modify some arg parse in TikaCLI (#340)
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch branch_1x
in repository https://gitbox.apache.org/repos/asf/tika.git
commit 9c2e5e6d25d1a1f2c47b2135be9900f7b0a35ea6
Author: Lee <55...@users.noreply.github.com>
AuthorDate: Wed Sep 9 21:15:36 2020 +0800
Modify some arg parse in TikaCLI (#340)
1. fix parse arg "--client="
2. make the way of parse arg "--compare-file-magic" same as others
---
tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
index 46f82ee..b57822c 100644
--- a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
+++ b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
@@ -395,7 +395,7 @@ public class TikaCLI {
displaySupportedTypes();
} else if (arg.startsWith("--compare-file-magic=")) {
pipeMode = false;
- compareFileMagic(arg.substring(arg.indexOf('=')+1));
+ compareFileMagic(arg.substring("--compare-file-magic=".length()));
} else if (arg.equals("--dump-minimal-config")) {
pipeMode = false;
dumpConfig(TikaConfigSerializer.Mode.MINIMAL);
@@ -467,7 +467,7 @@ public class TikaCLI {
} else if (arg.startsWith("-c")) {
networkURI = new URI(arg.substring("-c".length()));
} else if (arg.startsWith("--client=")) {
- networkURI = new URI(arg.substring("-c".length()));
+ networkURI = new URI(arg.substring("--client=".length()));
} else {
pipeMode = false;
configure();