Fixed wrong local state of a file after a download finishes

This commit is contained in:
David A. Velasco 2014-02-10 09:29:33 +01:00
parent 7cf9c82cc0
commit 3e6de92847

View file

@ -382,7 +382,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
* Updates the OC File after a successful download.
*/
private void saveDownloadedFile() {
OCFile file = mCurrentDownload.getFile();
OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId());
long syncDate = System.currentTimeMillis();
file.setLastSyncDateForProperties(syncDate);
file.setLastSyncDateForData(syncDate);