Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/c2pa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,12 @@ inline std::string path_to_string(const std::filesystem::path &source_path)
template<typename StreamType>
inline std::unique_ptr<StreamType> open_file_binary(const std::filesystem::path &path)
{
auto path_str = path_to_string(path);
auto stream = std::make_unique<StreamType>(
path_str,
path,
std::ios_base::binary
);
if (!stream->is_open()) {
throw C2paException("Failed to open file: " + path_str);
throw C2paException("Failed to open file: " + path.string());
}
return stream;
}
Expand Down