X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d8ac7b2241bc99df58b5f4be4c3c4d83fc9efaf6..5b54915209ce26d977d9dabb97001ac06b24441a:/src/com/owncloud/android/services/OperationsService.java diff --git a/src/com/owncloud/android/services/OperationsService.java b/src/com/owncloud/android/services/OperationsService.java index 779e5b6a..5e038f14 100644 --- a/src/com/owncloud/android/services/OperationsService.java +++ b/src/com/owncloud/android/services/OperationsService.java @@ -17,6 +17,7 @@ package com.owncloud.android.services; +import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; @@ -469,8 +470,22 @@ public class OperationsService extends Service { } catch (IOException e) { Log_OC.e(TAG, "Error while trying to get autorization", e); } finally { - synchronized(mPendingOperations) { + synchronized (mPendingOperations) { mPendingOperations.remove(syncKey); + /* + SynchronizeFolderOperation checkedOp = mCurrentSyncOperation; + String checkedKey = syncKey; + while (checkedOp.getPendingChildrenCount() <= 0) { + // while (!checkedOp.hasChildren()) { + mPendingOperations.remove(checkedKey); + String parentKey = buildRemoteName(account, (new File(checkedOp.getFolderPath())).getParent()); + // String parentKey = buildRemoteName(account, checkedOp.getParentPath()); + SynchronizeFolderOperation parentOp = mPendingOperations.get(parentKey); + if (parentOp != null) { + parentOp.decreasePendingChildrenCount(); + } + } + */ } mService.dispatchResultToOperationListeners(null, mCurrentSyncOperation, result);