Skip to content

Commit

Permalink
Re #5146. Be sure to close the file at the end of fileCheck().
Browse files Browse the repository at this point in the history
Not doing so broke ADARA event nexus file loading (which also have
a .h5 extension. Also downgraded a log message to debug.
  • Loading branch information
RussellTaylor committed Jan 2, 2013
1 parent beffd50 commit 791e3f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Code/Mantid/Framework/DataHandling/src/LoadSassena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ int LoadSassena::fileCheck(const std::string &filePath)
int confidence(0);
hid_t h5file = H5Fopen(filePath.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
if (H5LTfind_attribute(h5file,"sassena_version")==1)
{
confidence = 99;
}
else
{
this->g_log.error("no version attribute found");
this->g_log.debug("LoadSassena::fileCheck - no version attribute found");
}
// Be sure to close the file before returning
H5Fclose(h5file);
return confidence;
}

Expand Down

0 comments on commit 791e3f2

Please sign in to comment.