From b09b8b5c51795e6c19c3af6d48f4b0af2b1aced7 Mon Sep 17 00:00:00 2001 From: 233boy <31657650+233boy@users.noreply.github.com> Date: Tue, 23 May 2023 23:48:34 +0800 Subject: [PATCH] fix config read err --- src/core.sh | 2 +- v2ray.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.sh b/src/core.sh index 53337e1..b971ebf 100644 --- a/src/core.sh +++ b/src/core.sh @@ -1152,7 +1152,7 @@ get() { is_file_str=$2 [[ ! $is_file_str ]] && is_file_str='.json$' # is_all_json=("$(ls $is_conf_dir | egrep $is_file_str)") - readarray -t is_all_json <<<$(ls $is_conf_dir | egrep -i "$is_file_str" | sed '/dynamic-port-.*-link/d' | head -233) # limit max 233 lines for show. + readarray -t is_all_json <<<"$(ls $is_conf_dir | egrep -i "$is_file_str" | sed '/dynamic-port-.*-link/d' | head -233)" # limit max 233 lines for show. [[ ! $is_all_json ]] && err "无法找到相关的配置文件: $2" [[ ${#is_all_json[@]} -eq 1 ]] && is_config_file=$is_all_json && is_auto_get_config=1 [[ ! $is_config_file ]] && { diff --git a/v2ray.sh b/v2ray.sh index 7efbee3..c012feb 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -1,6 +1,6 @@ #!/bin/bash args=$@ -is_sh_ver=v4.04 +is_sh_ver=v4.05 . /etc/v2ray/sh/src/init.sh