2009-05-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use s itself instead of !s.bad()
	* src/CookieStorage.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-05-22 16:09:37 +00:00
parent dd5bbbc12c
commit d99ca899ef
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-05-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use s itself instead of !s.bad()
* src/CookieStorage.cc
2009-05-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2009-05-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Documented --on-download-* option and --save-cookies option in man Documented --on-download-* option and --save-cookies option in man

View File

@ -147,7 +147,7 @@ void CookieStorage::load(const std::string& filename)
{ {
std::ifstream s(filename.c_str(), std::ios::binary); std::ifstream s(filename.c_str(), std::ios::binary);
s.get(header, sizeof(header)); s.get(header, sizeof(header));
if(s.bad()) { if(!s) {
throw DL_ABORT_EX throw DL_ABORT_EX
(StringFormat("Failed to read header of cookie file %s", (StringFormat("Failed to read header of cookie file %s",
filename.c_str()).str()); filename.c_str()).str());