소스 검색

proper return values from download_to_X

David Rose 16 년 전
부모
커밋
b5eec63e07
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      panda/src/downloader/httpChannel.cxx

+ 3 - 3
panda/src/downloader/httpChannel.cxx

@@ -646,7 +646,7 @@ download_to_file(const Filename &filename, bool subdocument_resumes) {
 
   while (run()) {
   }
-  return is_download_complete();
+  return is_download_complete() && is_valid();
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -703,7 +703,7 @@ download_to_ram(Ramfile *ramfile, bool subdocument_resumes) {
 
   while (run()) {
   }
-  return is_download_complete();
+  return is_download_complete() && is_valid();
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -763,7 +763,7 @@ download_to_stream(ostream *strm, bool subdocument_resumes) {
 
   while (run()) {
   }
-  return is_download_complete();
+  return is_download_complete() && is_valid();
 }
 
 ////////////////////////////////////////////////////////////////////