Browse Source

proper return values from download_to_X

David Rose 16 years ago
parent
commit
b5eec63e07
1 changed files with 3 additions and 3 deletions
  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();
 }
 
 ////////////////////////////////////////////////////////////////////