Skip to content

Commit

Permalink
base/file: fix windows implem
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jul 31, 2024
1 parent a66e4da commit e29da45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ortools/base/file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ absl::Status GetContents(absl::string_view filename, std::string* output,
// On windows, binary files needs to be opened with the "rb" flags.
file->Close();
// Retry in binary mode.
status = file::Open(filename, "rb", &file, flags);
status = file::Open(filename, "rb", &file, options);
if (!status.ok()) return status;

const int64_t b_size = file->Size();
if (file->ReadToString(output, b_size) == b_size) {
status.Update(file->Close(flags));
status.Update(file->Close(options));
return status;
}
#endif // _MSC_VER
Expand Down

0 comments on commit e29da45

Please sign in to comment.