Skip to content

Commit

Permalink
UploadObject: open files always in binary mode (#186)
Browse files Browse the repository at this point in the history
fixes #145
  • Loading branch information
harshavardhana authored Jan 19, 2025
1 parent b8ebbf3 commit d1eafd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ UploadObjectResponse Client::UploadObject(UploadObjectArgs args) {
std::ifstream file;
file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
try {
file.open(args.filename);
file.open(args.filename, std::ios::binary);
} catch (std::system_error& err) {
return error::make<UploadObjectResponse>(
"unable to open file " + args.filename + "; " + err.code().message());
Expand Down

0 comments on commit d1eafd6

Please sign in to comment.