From 281eedb71e5c0728a24f5b2ce4fd475884f3c7df Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 11 Nov 2023 16:42:38 -0600 Subject: [PATCH] refactor s3 provider --- include/comm/curl/curl_comm.hpp | 1 + src/comm/curl/requests/http_put_file.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/comm/curl/curl_comm.hpp b/include/comm/curl/curl_comm.hpp index 86a83434..76331942 100644 --- a/include/comm/curl/curl_comm.hpp +++ b/include/comm/curl/curl_comm.hpp @@ -196,6 +196,7 @@ public: CURLcode curl_code{}; curl_request.get_result(curl_code, response_code); if (curl_code != CURLE_OK) { + std::cout << curl_easy_strerror(curl_code) << std::endl; return false; } diff --git a/src/comm/curl/requests/http_put_file.cpp b/src/comm/curl/requests/http_put_file.cpp index 2149e821..1aff539b 100644 --- a/src/comm/curl/requests/http_put_file.cpp +++ b/src/comm/curl/requests/http_put_file.cpp @@ -48,7 +48,8 @@ auto http_put_file::set_method(CURL *curl, stop_type &stop_requested) const stop_requested, }); - if (native_file::open(source_path, read_info->nf) != api_error::success) { + if (native_file::create_or_open(source_path, read_info->nf) != + api_error::success) { return false; }