Bug fixed: download followed by refresh always resulted in upload, although the file...
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileDownloader.java
index 0ca4248..b89a1c3 100644 (file)
@@ -59,6 +59,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
     public static final String EXTRA_ACCOUNT = "ACCOUNT";\r
     public static final String EXTRA_FILE = "FILE";\r
     \r
+    public static final String DOWNLOAD_ADDED_MESSAGE = "DOWNLOAD_ADDED";\r
     public static final String DOWNLOAD_FINISH_MESSAGE = "DOWNLOAD_FINISH";\r
     public static final String EXTRA_DOWNLOAD_RESULT = "RESULT";    \r
     public static final String EXTRA_FILE_PATH = "FILE_PATH";\r
@@ -282,7 +283,9 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
      */\r
     private void saveDownloadedFile() {\r
         OCFile file = mCurrentDownload.getFile();\r
-        file.setLastSyncDate(System.currentTimeMillis());\r
+        long syncDate = System.currentTimeMillis();\r
+        file.setLastSyncDateForProperties(syncDate);\r
+        file.setLastSyncDateForData(syncDate);\r
         file.setModificationTimestamp(mCurrentDownload.getModificationTimestamp());\r
         // file.setEtag(mCurrentDownload.getEtag());    // TODO Etag, where available\r
         file.setMimetype(mCurrentDownload.getMimeType());\r