Skip to content

Commit a89d1fe

Browse files
authored
Merge pull request #25 from FAIRDataPipeline/hotfix/gcc_fix
Cast path to string
2 parents 554236b + 1907a0d commit a89d1fe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/fdp/registry/data_io.hxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ghc::filesystem::path create_estimate(T &value,
7777
ghc::filesystem::create_directories(output_filename_.parent_path());
7878
}
7979

80-
toml_out_.open(output_filename_);
80+
toml_out_.open(output_filename_.string());
8181

8282
if (!toml_out_) {
8383
throw std::runtime_error("Failed to open TOML file for writing");

src/objects/metadata.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ std::string calculate_hash_from_file(const ghc::filesystem::path &file_path) {
66
throw std::invalid_argument("File '" + file_path.string() + "' not found");
77
}
88

9-
std::ifstream file_(file_path, std::ios_base::in | std::ios_base::binary);
9+
std::ifstream file_(file_path.string(), std::ios_base::in | std::ios_base::binary);
1010

1111
const std::string hash_ = digestpp::sha1().absorb(file_).hexdigest();
1212

@@ -78,7 +78,7 @@ bool file_exists( const std::string &Filename )
7878
}
7979

8080
std::string read_token(const ghc::filesystem::path &token_path){
81-
std::ifstream key_(token_path, std::ios::in);
81+
std::ifstream key_(token_path.string(), std::ios::in);
8282
std::string key_str_;
8383
key_ >> key_str_;
8484
key_.close();

0 commit comments

Comments
 (0)