Browse Source

Prevent that full synchronization process browses deeper when already knows no change exists under the current folder

David A. Velasco 11 năm trước cách đây
mục cha
commit
dabcf4dce4
1 tập tin đã thay đổi với 2 bổ sung8 xóa
  1. 2 8
      src/com/owncloud/android/syncadapter/FileSyncAdapter.java

+ 2 - 8
src/com/owncloud/android/syncadapter/FileSyncAdapter.java

@@ -339,18 +339,12 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
     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);
-                //}
+                }
             }
         }