mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Merge pull request #14 from owncloud/send_file_pr311_with_develop
Added check on the size of the downloded file
This commit is contained in:
		
						commit
						9040e5087f
					
				| @ -131,12 +131,16 @@ public class DownloadRemoteFileOperation extends RemoteOperation { | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|                 if (transferred == totalToTransfer) {  // Check if the file is completed | ||||
|                 	savedFile = true; | ||||
|                 	Header modificationTime = mGet.getResponseHeader("Last-Modified"); | ||||
|                 	if (modificationTime != null) { | ||||
|                 		Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue()); | ||||
|                 		mModificationTimestamp = (d != null) ? d.getTime() : 0; | ||||
|                 	} | ||||
|                 } else { | ||||
|                 	client.exhaustResponse(mGet.getResponseBodyAsStream()); | ||||
|                 } | ||||
|                  | ||||
|             } else { | ||||
|                 client.exhaustResponse(mGet.getResponseBodyAsStream()); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user