diff options
| author | cah <cth@carlh.net> | 2025-07-10 22:47:19 +0200 |
|---|---|---|
| committer | cah <cth@carlh.net> | 2025-07-10 22:47:19 +0200 |
| commit | 4be4e97abf911e7633172ada950d107a3ed28834 (patch) | |
| tree | c9deceb5f3684fa081db0613da88264732093fcb /src/lib/curl_uploader.cc | |
| parent | 727c1aa7da8b325dfa38c8443b1dd356acaf6ec3 (diff) | |
| parent | 42bde2d97039f6d0d645d83db90612d18ebf225a (diff) | |
Merge branch 'compose-to-fmt-take2'
This removes all uses of String::compose, replacing them with fmt and
updating the i18n strings where required.
Diffstat (limited to 'src/lib/curl_uploader.cc')
| -rw-r--r-- | src/lib/curl_uploader.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/curl_uploader.cc b/src/lib/curl_uploader.cc index 753c66496..91ef6b7a4 100644 --- a/src/lib/curl_uploader.cc +++ b/src/lib/curl_uploader.cc @@ -24,7 +24,6 @@ #include "exceptions.h" #include "config.h" #include "cross.h" -#include "compose.hpp" #include "dcpomatic_assert.h" #include <iostream> @@ -94,12 +93,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)); + throw NetworkError(fmt::format(_("Could not open {} to send"), from.string())); } _file = file.get(); _transferred = &transferred; @@ -107,7 +106,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 +132,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; } |
