Skip to content

Commit

Permalink
refs #5941. Pass quickFileCheck() for .h5 files.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcampbell committed Nov 5, 2012
1 parent bc34300 commit ee88c74
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,13 @@ LoadEventNexus::~LoadEventNexus()
bool LoadEventNexus::quickFileCheck(const std::string& filePath,size_t nread, const file_header& header)
{
std::string ext = this->extension(filePath);
g_log.debug() << "LoadEventNexus::quickFileCheck() - File extension is: " << ext << std::endl;

// If the extension is nxs then give it a go
if( ext.compare("nxs") == 0 ) return true;
// If the extension is h5 then give it a go
if( ext.compare("h5") == 0 ) return true;


// If not then let's see if it is a HDF file by checking for the magic cookie
if ( nread >= sizeof(int32_t) && (ntohl(header.four_bytes) == g_hdf_cookie) ) return true;
Expand Down

0 comments on commit ee88c74

Please sign in to comment.