From de55337e1c384faa1853d7cc82c86e38a25618dd Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 31 Aug 2024 07:54:34 -0500 Subject: [PATCH] updated build system --- support/src/utils/file.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support/src/utils/file.cpp b/support/src/utils/file.cpp index bd5447d9..40f63710 100644 --- a/support/src/utils/file.cpp +++ b/support/src/utils/file.cpp @@ -213,7 +213,8 @@ auto get_total_drive_space(std::string_view path) try { #if defined(_WIN32) ULARGE_INTEGER li{}; - if (not ::GetDiskFreeSpaceEx(path.c_str(), nullptr, &li, nullptr)) { + if (not ::GetDiskFreeSpaceEx(std::string{path}.c_str(), nullptr, &li, + nullptr)) { throw std::runtime_error("failed to get total disk space|" + std::string{path} + '|' + std::to_string(utils::get_last_error_code()));