/* ownCloud Android client application\r
* Copyright (C) 2012 Bartek Przybylski\r
+ * Copyright (C) 2012-2013 ownCloud Inc.\r
*\r
* This program is free software: you can redistribute it and/or modify\r
* it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
+ * the Free Software Foundation, either version 2 of the License, or\r
* (at your option) any later version.\r
*\r
* This program is distributed in the hope that it will be useful,\r
* @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
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