sendLocalBroadcast(EVENT_SINGLE_FOLDER_CONTENTS_SYNCED, mLocalFolder.getRemotePath(), result);
}
- if (result.isSuccess() && mIsShareSupported) {
- RemoteOperationResult shareResult = refreshSharesForFolder(client);
- if (shareResult.getCode() != ResultCode.FILE_NOT_FOUND) {
- result = shareResult;
- } // else , keep the previous result ; being conservative for servers where Sharing API is supported, but disabled
+ if (result.isSuccess() && mIsShareSupported && !mSyncFullAccount) {
+ refreshSharesForFolder(client); // share result is ignored
}
if (!mSyncFullAccount) {
private void fetchChildren(OCFile parent, List<OCFile> files, boolean parentEtagChanged) {
int i;
OCFile newFile = null;
- //String etag = null;
- //boolean syncDown = false;
for (i=0; i < files.size() && !mCancellation; i++) {
newFile = files.get(i);
if (newFile.isFolder()) {
- /*
- etag = newFile.getEtag();
- syncDown = (parentEtagChanged || etag == null || etag.length() == 0);
- if(syncDown) { */
+ if(parentEtagChanged) { // prevent go deeper if already know there are no more changes
synchronizeFolder(newFile);
- //sendLocalBroadcast(EVENT_FULL_SYNC_FOLDER_SIZE_SYNCED, parent.getRemotePath(), null);
- //}
+ }
}
}