Fixed wrong local state of a file after a download finishes
authorDavid A. Velasco <dvelasco@solidgear.es>
Mon, 10 Feb 2014 08:29:33 +0000 (09:29 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Mon, 10 Feb 2014 08:29:33 +0000 (09:29 +0100)
src/com/owncloud/android/files/services/FileDownloader.java

index 064b703..67bd796 100644 (file)
@@ -382,7 +382,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
      * Updates the OC File after a successful download.
      */
     private void saveDownloadedFile() {
      * 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);
         long syncDate = System.currentTimeMillis();
         file.setLastSyncDateForProperties(syncDate);
         file.setLastSyncDateForData(syncDate);