if (mRemoteFolderChanged) {
result = fetchAndSyncRemoteFolder(client);
} else {
- mChildren = mStorageManager.getFolderContent(mLocalFolder);
+ // TODO Enable when "On Device" is recovered ?
+ mChildren = mStorageManager.getFolderContent(mLocalFolder/*, false*/);
}
}
if (!mIgnoreETag) {
// check if remote and local folder are different
- mRemoteFolderChanged =
- !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
+ String remoteFolderETag = remoteFolder.getEtag();
+ if (remoteFolderETag != null) {
+ mRemoteFolderChanged =
+ !(remoteFolderETag.equalsIgnoreCase(mLocalFolder.getEtag()));
+ } else {
+ Log_OC.e(TAG, "Checked " + mAccount.name + remotePath + " : " +
+ "No ETag received from server");
+ }
}
result = new RemoteOperationResult(ResultCode.OK);
List<SynchronizeFileOperation> filesToSyncContents = new Vector<SynchronizeFileOperation>();
// get current data about local contents of the folder to synchronize
- List<OCFile> localFiles = mStorageManager.getFolderContent(mLocalFolder);
+ // TODO Enable when "On Device" is recovered ?
+ List<OCFile> localFiles = mStorageManager.getFolderContent(mLocalFolder/*, false*/);
Map<String, OCFile> localFilesMap = new HashMap<String, OCFile>(localFiles.size());
for (OCFile file : localFiles) {
localFilesMap.put(file.getRemotePath(), file);
if (localFile != null) {
// some properties of local state are kept unmodified
remoteFile.setFileId(localFile.getFileId());
- remoteFile.setKeepInSync(localFile.keepInSync());
+ remoteFile.setFavorite(localFile.isFavorite());
remoteFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
remoteFile.setModificationTimestampAtLastSyncForData(
localFile.getModificationTimestampAtLastSyncForData()
searchForLocalFileInDefaultPath(remoteFile); // legacy
/// prepare content synchronization for kept-in-sync files
- if (remoteFile.keepInSync()) {
+ if (remoteFile.isFavorite()) {
SynchronizeFileOperation operation = new SynchronizeFileOperation( localFile,
remoteFile,
mAccount,