X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d8de614d78c283d6d09849818c8043006e887256..e3be4babaf7e304b997e3d51cbd298cab7d63409:/src/com/owncloud/android/syncadapter/FileSyncAdapter.java diff --git a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java index 6b6264f4..06a83e99 100644 --- a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java @@ -263,11 +263,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { } // synchronize children folders List children = synchFolderOp.getChildren(); - fetchChildren(children); // beware of the 'hidden' recursion here! - - // update folder size again after recursive synchronization - getStorageManager().calculateFolderSize(folder.getFileId()); - sendStickyBroadcast(true, folder.getRemotePath(), null); // notify again + fetchChildren(folder, children); // beware of the 'hidden' recursion here! } else { // in failures, the statistics for the global result are updated @@ -311,12 +307,15 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { * * @param files Files to recursively synchronize. */ - private void fetchChildren(List files) { + private void fetchChildren(OCFile parent, List files) { int i; for (i=0; i < files.size() && !mCancellation; i++) { OCFile newFile = files.get(i); if (newFile.isFolder()) { synchronizeFolder(newFile, false); + // update the size of the parent folder again after recursive synchronization + getStorageManager().updateFolderSize(parent.getFileId()); + sendStickyBroadcast(true, parent.getRemotePath(), null); // notify again to refresh size in UI } }