summaryrefslogtreecommitdiff
path: root/src/lib/curl_uploader.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-09 22:53:27 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-10 20:50:32 +0200
commit62c34b28567a097e8f22576e7d7891bd3dbe0ac0 (patch)
tree2a0440ed2bdb58c608582b75da6c877527dd6bda /src/lib/curl_uploader.cc
parent2c499921a9f8615c8368d8161cb43c9a93c67311 (diff)
Replace String::compose with fmt.
sed -i "/Plural-Forms/n;/%100/n;/scanf/n;s/%[123456789]/{}/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc src/lib/po/*.po src/wx/po/*.po src/tools/po/*.po test/*.cc sed -i "s/String::compose */fmt::format/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc test/*.cc
Diffstat (limited to 'src/lib/curl_uploader.cc')
-rw-r--r--src/lib/curl_uploader.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/curl_uploader.cc b/src/lib/curl_uploader.cc
index 791bdb3fa..769cdf673 100644
--- a/src/lib/curl_uploader.cc
+++ b/src/lib/curl_uploader.cc
@@ -94,12 +94,12 @@ CurlUploader::upload_file(boost::filesystem::path from, boost::filesystem::path
curl_easy_setopt(
_curl, CURLOPT_URL,
/* Use generic_string so that we get forward-slashes in the path, even on Windows */
- String::compose("ftp://%1/%2/%3", Config::instance()->tms_ip(), Config::instance()->tms_path(), to.generic_string()).c_str()
+ fmt::format("ftp://{}/{}/{}", Config::instance()->tms_ip(), Config::instance()->tms_path(), to.generic_string()).c_str()
);
dcp::File file(from, "rb");
if (!file) {
- throw NetworkError(String::compose(_("Could not open %1 to send"), from.string()));
+ throw NetworkError(fmt::format(_("Could not open {} to send"), from.string()));
}
_file = file.get();
_transferred = &transferred;
@@ -107,7 +107,7 @@ CurlUploader::upload_file(boost::filesystem::path from, boost::filesystem::path
auto const r = curl_easy_perform(_curl);
if (r != CURLE_OK) {
- throw NetworkError(String::compose(_("Could not write to remote file (%1)"), curl_easy_strerror(r)));
+ throw NetworkError(fmt::format(_("Could not write to remote file ({})"), curl_easy_strerror(r)));
}
_file = nullptr;
@@ -133,7 +133,7 @@ int
CurlUploader::debug(CURL *, curl_infotype type, char* data, size_t size)
{
if (type == CURLINFO_TEXT && size > 0) {
- LOG_GENERAL("CurlUploader: %1", string(data, size - 1));
+ LOG_GENERAL("CurlUploader: {}", string(data, size - 1));
}
return 0;
}