Merge branch 'develop' into rename_with_special_character
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileDownloader.java
index cb0f12c..c9ad961 100644 (file)
@@ -398,7 +398,9 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
         file.setMimetype(mCurrentDownload.getMimeType());
         file.setStoragePath(mCurrentDownload.getSavePath());
         file.setFileLength((new File(mCurrentDownload.getSavePath()).length()));
         file.setMimetype(mCurrentDownload.getMimeType());
         file.setStoragePath(mCurrentDownload.getSavePath());
         file.setFileLength((new File(mCurrentDownload.getSavePath()).length()));
+        file.setRemoteId(mCurrentDownload.getFile().getRemoteId());
         mStorageManager.saveFile(file);
         mStorageManager.saveFile(file);
+        mStorageManager.triggerMediaScan(file.getStoragePath());
     }
 
 
     }