chore: Rename download_to_tempfile to download_to_file for clarity

This commit is contained in:
Andrey Petelin
2025-09-09 11:48:03 +05:00
parent 79cea7a31a
commit 191522f396
2 changed files with 5 additions and 5 deletions

View File

@@ -1213,7 +1213,7 @@ import_community_service_subnet_list_handler() {
tmpfile=$(mktemp)
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
log "Download $service list failed" "error"
@@ -1302,7 +1302,7 @@ import_domains_or_subnets_from_remote_file() {
tmpfile=$(mktemp)
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
log "Download $url list failed" "error"
@@ -1357,7 +1357,7 @@ import_subnets_from_remote_srs_file() {
subnets_tmpfile="$(mktemp)"
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
log "Download $url list failed" "error"

View File

@@ -228,8 +228,8 @@ download_to_stream() {
done
}
# Download URL to temporary file
download_to_tempfile() {
# Download URL to file
download_to_file() {
local url="$1"
local filepath="$2"
local http_proxy_address="$3"