Skip to content

Commit 36803b1

Browse files
committed
common : cont
ggml-ci
1 parent a59ee7c commit 36803b1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

common/common.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,18 +1294,18 @@ static bool common_download_file(const std::string & url, const std::string & pa
12941294
curl_easy_setopt(curl.get(), CURLOPT_NOPROGRESS, 0L);
12951295

12961296
// helper function to hide password in URL
1297-
auto llama_download_hide_password_in_url = [](const std::string & url) -> std::string {
1298-
std::size_t protocol_pos = url.find("://");
1297+
auto llama_download_hide_password_in_url = [](const std::string & url_full) -> std::string {
1298+
std::size_t protocol_pos = url_full.find("://");
12991299
if (protocol_pos == std::string::npos) {
1300-
return url; // Malformed URL
1300+
return url_full; // Malformed URL
13011301
}
13021302

1303-
std::size_t at_pos = url.find('@', protocol_pos + 3);
1303+
std::size_t at_pos = url_full.find('@', protocol_pos + 3);
13041304
if (at_pos == std::string::npos) {
1305-
return url; // No password in URL
1305+
return url_full; // No password in URL
13061306
}
13071307

1308-
return url.substr(0, protocol_pos + 3) + "********" + url.substr(at_pos);
1308+
return url_full.substr(0, protocol_pos + 3) + "********" + url_full.substr(at_pos);
13091309
};
13101310

13111311
// start the download

0 commit comments

Comments
 (0)