Commit 73f84803 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Fixing windows i/o issue with f71stream.

parent 4cf5ed99
Pipeline #12744 passed with stages
in 8 minutes and 56 seconds
......@@ -7,7 +7,7 @@ namespace radix
{
F71Stream::F71Stream(const std::string& file)
: mFile(file)
, mStream(file.c_str())
, mStream(file.c_str(), std::ios::binary | std::ios::in)
{
mStream.setReverseBytes(false);
}
......
......@@ -89,7 +89,7 @@ bool F71Stream::read_case(f71case_type& inventory)
// check if the file is open
if (!mStream.is_open())
{
mStream.open(mFile.c_str(), std::ios::binary);
mStream.open(mFile.c_str(), std::ios::binary | std::ios::in);
}
if (!mStream.is_open())
{
......
......@@ -8,7 +8,8 @@ using namespace radix;
TEST(Radixio, F71Stream)
{
// test reading a scale 6.1 formated f71 file from DELFIC
F71Stream stream(std::string(dirname(__FILE__) + "/data/test.s61.f71"));
F71Stream stream(radix::to_native_path(
std::string(dirname(__FILE__) + "/data/test.s61.f71")));
std::vector<F71Case> cases;
bool result = true;
while (result)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment