fix problems with unv files in UNIX format when reading under Windows

This commit is contained in:
wmayer
2016-09-01 15:30:12 +02:00
parent bbe755b900
commit 3314bbf690

View File

@@ -102,7 +102,10 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
{
// Kernel_Utils::Localizer loc;
Status aResult = DRS_OK;
std::ifstream in_stream(myFile.c_str());
// See http://forum.freecadweb.org/viewtopic.php?f=18&t=14404&p=135981#p136086 (wmayer)
// Line endings in UNIX format cause problems on Windows, thus the file must be opened
// in binary mode.
std::ifstream in_stream(myFile.c_str(), std::ios::in | std::ios::binary);
try
{
{