Skip to content

Commit

Permalink
Fix open mode binary (windows bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Gouache committed Sep 16, 2024
1 parent 6779944 commit a5e7b19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/drivertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void compareSize(const char *file_name_output, long long int filesize) {

void compareFiles(std::string local_file_path, std::string gcs_uri) {
// Lire le fichier local
std::ifstream local_file(local_file_path);
std::ifstream local_file(local_file_path, std::ios::binary);
if (!local_file) {
std::cerr << "Failure reading local file" << std::endl;
global_error = 1;
Expand Down
4 changes: 2 additions & 2 deletions test/drivertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ int compareSize(const char *file_name_output, long long int filesize) {

int compareFiles(std::string local_file_path, std::string gcs_uri) {
// Lire le fichier local
std::ifstream local_file(local_file_path);
std::ifstream local_file(local_file_path, std::ios::binary);
if (!local_file) {
std::cerr << "Erreur lors de l'ouverture du fichier local." << std::endl;
return false;
Expand Down Expand Up @@ -480,4 +480,4 @@ int compareFiles(std::string local_file_path, std::string gcs_uri) {

// Comparer les contenus
return local_content == gcs_data ? kSuccess : kFailure;
}
}

0 comments on commit a5e7b19

Please sign in to comment.