Skip to content

Commit

Permalink
Merge pull request #25 from FAIRDataPipeline/hotfix/gcc_fix
Browse files Browse the repository at this point in the history
Cast path to string
  • Loading branch information
RyanJField authored Apr 29, 2022
2 parents 554236b + 1907a0d commit a89d1fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/fdp/registry/data_io.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions src/objects/metadata.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit a89d1fe

Please sign in to comment.