Fixed icon for text files
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileDownloader.java
index 5e80f5d..7872c36 100644 (file)
@@ -198,6 +198,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
          * @param file          A file that could be in the queue of downloads.\r
          */\r
         public boolean isDownloading(Account account, OCFile file) {\r
+            if (account == null || file == null) return false;\r
             String targetKey = buildRemoteName(account, file);\r
             synchronized (mPendingDownloads) {\r
                 if (file.isDirectory()) {\r
@@ -301,6 +302,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
         file.setLastSyncDateForProperties(syncDate);\r
         file.setLastSyncDateForData(syncDate);\r
         file.setModificationTimestamp(mCurrentDownload.getModificationTimestamp());\r
+        file.setModificationTimestampAtLastSyncForData(mCurrentDownload.getModificationTimestamp());\r
         // file.setEtag(mCurrentDownload.getEtag());    // TODO Etag, where available\r
         file.setMimetype(mCurrentDownload.getMimeType());\r
         file.setStoragePath(mCurrentDownload.getSavePath());\r