- // loop to update every child
- OCFile remoteFile = null, localFile = null;
- for (int i = 1; i < dataInServer.getResponses().length; ++i) {
- /// new OCFile instance with the data from the server
- we = new WebdavEntry(dataInServer.getResponses()[i], client.getBaseUri().getPath());
- remoteFile = fillOCFile(we);
- remoteFile.setParentId(mLocalFolder.getFileId());
-
- /// retrieve local data for the read file
- //localFile = mStorageManager.getFileByPath(remoteFile.getRemotePath());
- localFile = localFilesMap.remove(remoteFile.getRemotePath());
-
- /// add to the remoteFile (the new one) data about LOCAL STATE (not existing in the server side)
- remoteFile.setLastSyncDateForProperties(mCurrentSyncTime);
- if (localFile != null) {
- // some properties of local state are kept unmodified
- remoteFile.setFileId(localFile.getFileId());
- remoteFile.setKeepInSync(localFile.keepInSync());
- remoteFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
- remoteFile.setModificationTimestampAtLastSyncForData(localFile.getModificationTimestampAtLastSyncForData());
- remoteFile.setStoragePath(localFile.getStoragePath());
- remoteFile.setEtag(localFile.getEtag()); // eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter)
- } else {
- remoteFile.setEtag(""); // remote eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter)
+ /// add to the remoteFile (the new one) data about LOCAL STATE (not existing in the server side)
+ remoteFile.setLastSyncDateForProperties(mCurrentSyncTime);
+ if (localFile != null) {
+ // some properties of local state are kept unmodified
+ remoteFile.setFileId(localFile.getFileId());
+ remoteFile.setKeepInSync(localFile.keepInSync());
+ remoteFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
+ remoteFile.setModificationTimestampAtLastSyncForData(localFile.getModificationTimestampAtLastSyncForData());
+ remoteFile.setStoragePath(localFile.getStoragePath());
+ remoteFile.setEtag(localFile.getEtag()); // eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter)
+ if (remoteFile.isFolder()) {
+ remoteFile.setFileLength(localFile.getFileLength()); // TODO move operations about size of folders to FileContentProvider