Skip to content

Commit

Permalink
Fix LoadSNSspec test.
Browse files Browse the repository at this point in the history
A \r left in the file after opening in binary mode confused the check.
Refs #7263
  • Loading branch information
martyngigg committed Jul 4, 2013
1 parent 84aa596 commit 6292160
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Code/Mantid/Framework/DataHandling/src/LoadSNSspec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,11 @@ namespace Mantid
boost::char_separator<char> sep(" ");
bool snsspec(false);

while(!file.eof())
while(std::getline(file,str))
{
//read line
std::getline(file,str);
if(str.empty())
{
continue;
}
// File is opened in binary mode so getline will leave a \r at the end of an empty line if it exists
if(str.empty() || str == "\r") continue;

try
{
//if it's comment line
Expand Down

0 comments on commit 6292160

Please sign in to comment.