Преглед на файлове

Fixed the bug that the message "Loaded cookies from ..." appears when
loading cookies from that file failed.

Tatsuhiro Tsujikawa преди 14 години
родител
ревизия
00fa59d0f5
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/MultiUrlRequestInfo.cc

+ 2 - 2
src/MultiUrlRequestInfo.cc

@@ -169,8 +169,8 @@ error_code::Value MultiUrlRequestInfo::execute()
 
     if(!option_->blank(PREF_LOAD_COOKIES)) {
       File cookieFile(option_->get(PREF_LOAD_COOKIES));
-      if(cookieFile.isFile()) {
-        e->getCookieStorage()->load(cookieFile.getPath(), Time().getTime());
+      if(cookieFile.isFile() &&
+         e->getCookieStorage()->load(cookieFile.getPath(), Time().getTime())) {
         A2_LOG_INFO(fmt("Loaded cookies from '%s'.",
                         cookieFile.getPath().c_str()));
       } else {