Skip to content

Commit

Permalink
FileDescriptor::resetStreamToStart needs to reset ios flags too.
Browse files Browse the repository at this point in the history
Also fix initialization that is not a pointer.
Refs #7263
  • Loading branch information
martyngigg committed Jul 4, 2013
1 parent 14a7ab1 commit 4ff024a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Code/Mantid/Framework/Kernel/src/FileDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace Mantid
* @throws std::invalid_argument if the filename is empty or the file does not exist
*/
FileDescriptor::FileDescriptor(const std::string & filename) :
m_filename(), m_extension(), m_file(NULL), m_ascii(false)
m_filename(), m_extension(), m_file(), m_ascii(false)
{
if(filename.empty())
{
Expand Down Expand Up @@ -106,6 +106,7 @@ namespace Mantid
*/
void FileDescriptor::resetStreamToStart()
{
m_file.close(); // reset all flags
// If the stream was closed, reopen it
if(!m_file.is_open())
{
Expand Down

0 comments on commit 4ff024a

Please sign in to comment.