From 1093e26216167bfd77ee95c287aa466bdf04f364 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Tue, 29 Oct 2024 11:15:39 +0100 Subject: [PATCH] debug --- cpp/include/kvikio/shim/libcurl.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cpp/include/kvikio/shim/libcurl.hpp b/cpp/include/kvikio/shim/libcurl.hpp index 3026bfad38..57397b8556 100644 --- a/cpp/include/kvikio/shim/libcurl.hpp +++ b/cpp/include/kvikio/shim/libcurl.hpp @@ -134,6 +134,12 @@ class LibCurl { } }; +__attribute__((optnone)) inline std::string fix_conda_fuckery(std::string filename) +{ + if (filename.data() != nullptr) { return std::string{filename.data()}; } + return std::string{}; +} + /** * @brief Representation of a curl easy handle pointer and its operations. * @@ -159,7 +165,7 @@ class CurlHandle { */ CurlHandle(LibCurl::UniqueHandlePtr handle, std::string source_file, std::string source_line) : _handle{std::move(handle)}, - _source_file(std::move(source_file)), + _source_file(fix_conda_fuckery(std::move(source_file))), _source_line(std::move(source_line)) { // Removing all '\0' characters