From: <pcb...@us...> - 2008-07-30 20:19:35
|
Revision: 338 http://proteowizard.svn.sourceforge.net/proteowizard/?rev=338&view=rev Author: pcbrefugee Date: 2008-07-30 20:19:41 +0000 (Wed, 30 Jul 2008) Log Message: ----------- wasn't setting failbit on failure to open input file, so error handling by callers wasn't possible Modified Paths: -------------- trunk/pwiz/pwiz/utility/misc/random_access_compressed_ifstream.cpp Modified: trunk/pwiz/pwiz/utility/misc/random_access_compressed_ifstream.cpp =================================================================== --- trunk/pwiz/pwiz/utility/misc/random_access_compressed_ifstream.cpp 2008-07-30 17:44:26 UTC (rev 337) +++ trunk/pwiz/pwiz/utility/misc/random_access_compressed_ifstream.cpp 2008-07-30 20:19:41 UTC (rev 338) @@ -152,6 +152,8 @@ // check for gzip magic header gzipped = ((fb->sbumpc() == gz_magic[0]) && (fb->sbumpc() == gz_magic[1])); fb->pubseekpos(0); // rewind + } else { + this->setstate(std::ios::failbit); // could not open, set the fail flag } if (gzipped) { // replace streambuf with gzip handler fb->close(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |