mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	OC-3097: (fix bug) When the connection is lost during a download, app thinks that the download is finished
This commit is contained in:
		
							parent
							
								
									cd4414a7bd
								
							
						
					
					
						commit
						fb267a0564
					
				| @ -131,11 +131,15 @@ public class DownloadRemoteFileOperation extends RemoteOperation { | |||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 savedFile = true; |                 if (transferred == totalToTransfer) {  // Check if the file is completed | ||||||
|                 Header modificationTime = mGet.getResponseHeader("Last-Modified"); |                 	savedFile = true; | ||||||
|                 if (modificationTime != null) { |                 	Header modificationTime = mGet.getResponseHeader("Last-Modified"); | ||||||
|                     Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue()); |                 	if (modificationTime != null) { | ||||||
|                     mModificationTimestamp = (d != null) ? d.getTime() : 0; |                 		Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue()); | ||||||
|  |                 		mModificationTimestamp = (d != null) ? d.getTime() : 0; | ||||||
|  |                 	} | ||||||
|  |                 } else { | ||||||
|  |                 	client.exhaustResponse(mGet.getResponseBodyAsStream()); | ||||||
|                 } |                 } | ||||||
|                  |                  | ||||||
|             } else { |             } else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user