Browse Source

Merge pull request #393 from owncloud/fix_unshare_while_downloading

Fixed wrong local state of a file after a download finishes
masensio 11 years ago
parent
commit
0f47656718
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/com/owncloud/android/files/services/FileDownloader.java

+ 1 - 1
src/com/owncloud/android/files/services/FileDownloader.java

@@ -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);