From 36803b1902195f3489ede64644fc5d2e8d51ea77 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 12 Jan 2025 16:53:44 +0200 Subject: [PATCH] common : cont ggml-ci --- common/common.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index 447fb03ea..e83537306 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1294,18 +1294,18 @@ static bool common_download_file(const std::string & url, const std::string & pa curl_easy_setopt(curl.get(), CURLOPT_NOPROGRESS, 0L); // helper function to hide password in URL - auto llama_download_hide_password_in_url = [](const std::string & url) -> std::string { - std::size_t protocol_pos = url.find("://"); + auto llama_download_hide_password_in_url = [](const std::string & url_full) -> std::string { + std::size_t protocol_pos = url_full.find("://"); if (protocol_pos == std::string::npos) { - return url; // Malformed URL + return url_full; // Malformed URL } - std::size_t at_pos = url.find('@', protocol_pos + 3); + std::size_t at_pos = url_full.find('@', protocol_pos + 3); if (at_pos == std::string::npos) { - return url; // No password in URL + return url_full; // No password in URL } - return url.substr(0, protocol_pos + 3) + "********" + url.substr(at_pos); + return url_full.substr(0, protocol_pos + 3) + "********" + url_full.substr(at_pos); }; // start the download