From 6d5d30eec054571f3406f95f403d648d12abd6d6 Mon Sep 17 00:00:00 2001 From: dangyifei Date: Tue, 3 Sep 2019 17:09:42 +0800 Subject: [PATCH] Fix check download mode --- cube/cube-transfer/conf/transfer.conf | 2 +- cube/cube-transfer/src/cube-transfer.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cube/cube-transfer/conf/transfer.conf b/cube/cube-transfer/conf/transfer.conf index bac2cf84..abc15a09 100755 --- a/cube/cube-transfer/conf/transfer.conf +++ b/cube/cube-transfer/conf/transfer.conf @@ -2,7 +2,7 @@ dict_name: test_dict mode: base_only download_mode: http -wget_port:8009 +wget_port: 8009 buildtool_local: /home/work/Serving/build/output/bin/cube-builder donefile_address: http://127.0.0.1/home/work/dangyifei/donefile output_address: /home/work/dangyifei/test-transfer/test_data/output diff --git a/cube/cube-transfer/src/cube-transfer.go b/cube/cube-transfer/src/cube-transfer.go index 61ca6632..ddc17c90 100755 --- a/cube/cube-transfer/src/cube-transfer.go +++ b/cube/cube-transfer/src/cube-transfer.go @@ -96,7 +96,7 @@ Log options: logex.Notice(">>> Mode:", transfer.Dict.DictMode) transfer.Dict.DownloadMode = configMgr.Read("default", "download_mode") - if transfer.Dict.DownloadMode != "http" || transfer.Dict.DownloadMode != "ftp" { + if transfer.Dict.DownloadMode != "http" && transfer.Dict.DownloadMode != "ftp" { fmt.Fprintln(os.Stderr, "ERROR: nead [default] download_mode in config_file! only support ftp or http") fmt.Fprintln(os.Stderr, usage) os.Exit(1) -- GitLab