mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-07 20:16:53 +03:00
chore: Rename download_to_tempfile to download_to_file for clarity
This commit is contained in:
@@ -1213,7 +1213,7 @@ import_community_service_subnet_list_handler() {
|
|||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
http_proxy_address="$(get_service_proxy_address)"
|
http_proxy_address="$(get_service_proxy_address)"
|
||||||
|
|
||||||
download_to_tempfile "$URL" "$tmpfile" "$http_proxy_address"
|
download_to_file "$URL" "$tmpfile" "$http_proxy_address"
|
||||||
|
|
||||||
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then
|
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then
|
||||||
log "Download $service list failed" "error"
|
log "Download $service list failed" "error"
|
||||||
@@ -1302,7 +1302,7 @@ import_domains_or_subnets_from_remote_file() {
|
|||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
http_proxy_address="$(get_service_proxy_address)"
|
http_proxy_address="$(get_service_proxy_address)"
|
||||||
|
|
||||||
download_to_tempfile "$url" "$tmpfile" "$http_proxy_address"
|
download_to_file "$url" "$tmpfile" "$http_proxy_address"
|
||||||
|
|
||||||
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then
|
if [ $? -ne 0 ] || [ ! -s "$tmpfile" ]; then
|
||||||
log "Download $url list failed" "error"
|
log "Download $url list failed" "error"
|
||||||
@@ -1357,7 +1357,7 @@ import_subnets_from_remote_srs_file() {
|
|||||||
subnets_tmpfile="$(mktemp)"
|
subnets_tmpfile="$(mktemp)"
|
||||||
http_proxy_address="$(get_service_proxy_address)"
|
http_proxy_address="$(get_service_proxy_address)"
|
||||||
|
|
||||||
download_to_tempfile "$url" "$binary_tmpfile" "$http_proxy_address"
|
download_to_file "$url" "$binary_tmpfile" "$http_proxy_address"
|
||||||
|
|
||||||
if [ $? -ne 0 ] || [ ! -s "$binary_tmpfile" ]; then
|
if [ $? -ne 0 ] || [ ! -s "$binary_tmpfile" ]; then
|
||||||
log "Download $url list failed" "error"
|
log "Download $url list failed" "error"
|
||||||
|
|||||||
@@ -228,8 +228,8 @@ download_to_stream() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download URL to temporary file
|
# Download URL to file
|
||||||
download_to_tempfile() {
|
download_to_file() {
|
||||||
local url="$1"
|
local url="$1"
|
||||||
local filepath="$2"
|
local filepath="$2"
|
||||||
local http_proxy_address="$3"
|
local http_proxy_address="$3"
|
||||||
|
|||||||
Reference in New Issue
Block a user