Skip to content

Commit

Permalink
Fixed problems with the resulting .wp file on Linux due to \r's
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabr0sa committed Nov 23, 2021
1 parent 46bf592 commit e58ab0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

void Converter::read(std::string_view fileName)
{
std::ifstream file(fileName.data(), std::ifstream::binary);
std::ifstream file(fileName.data(), std::ios::binary);

std::cout << "Read file: " << fileName << std::endl;
if (!file.is_open())
Expand Down Expand Up @@ -207,7 +207,7 @@ void Converter::write(std::string_view fileName) const
return;
}

std::ofstream file(fileName.data());
std::ofstream file(fileName.data(), std::ios::binary); // don't convert \n to \r\n on Windows

std::cout << std::endl << "Write file: " << fileName << std::endl;
if (!file.is_open())
Expand Down

0 comments on commit e58ab0a

Please sign in to comment.