diff --git a/include/fdp/registry/data_io.hxx b/include/fdp/registry/data_io.hxx index 60f47c0..b52eed1 100644 --- a/include/fdp/registry/data_io.hxx +++ b/include/fdp/registry/data_io.hxx @@ -77,7 +77,7 @@ ghc::filesystem::path create_estimate(T &value, ghc::filesystem::create_directories(output_filename_.parent_path()); } - toml_out_.open(output_filename_); + toml_out_.open(output_filename_.string()); if (!toml_out_) { throw std::runtime_error("Failed to open TOML file for writing"); diff --git a/src/objects/metadata.cxx b/src/objects/metadata.cxx index 05ce8ed..6286a0f 100644 --- a/src/objects/metadata.cxx +++ b/src/objects/metadata.cxx @@ -6,7 +6,7 @@ std::string calculate_hash_from_file(const ghc::filesystem::path &file_path) { throw std::invalid_argument("File '" + file_path.string() + "' not found"); } - std::ifstream file_(file_path, std::ios_base::in | std::ios_base::binary); + std::ifstream file_(file_path.string(), std::ios_base::in | std::ios_base::binary); const std::string hash_ = digestpp::sha1().absorb(file_).hexdigest(); @@ -78,7 +78,7 @@ bool file_exists( const std::string &Filename ) } std::string read_token(const ghc::filesystem::path &token_path){ - std::ifstream key_(token_path, std::ios::in); + std::ifstream key_(token_path.string(), std::ios::in); std::string key_str_; key_ >> key_str_; key_.close();