mirror of https://github.com/aria2/aria2
2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Check stream status after file is opened. * src/CookieStorage.ccpull/1/head
parent
f4a533846d
commit
2e9c39d6ba
|
@ -1,3 +1,8 @@
|
|||
2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Check stream status after file is opened.
|
||||
* src/CookieStorage.cc
|
||||
|
||||
2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Rewritten Signature::save()
|
||||
|
|
|
@ -146,6 +146,10 @@ bool CookieStorage::load(const std::string& filename)
|
|||
{
|
||||
char header[16]; // "SQLite format 3" plus \0
|
||||
std::ifstream s(filename.c_str(), std::ios::binary);
|
||||
if(!s) {
|
||||
_logger->error("Failed to open cookie file %s", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
s.get(header, sizeof(header));
|
||||
if(!s) {
|
||||
_logger->error("Failed to read header of cookie file %s",
|
||||
|
|
Loading…
Reference in New Issue