+ if (file.isFolder()) {
+ Log_OC.d(TAG, "Canceling pending sync operations");
+ Iterator<String> it = mPendingOperations.keySet().iterator();
+ boolean found = false;
+ while (it.hasNext()) {
+ String keySyncOperation = it.next();
+ found = keySyncOperation.startsWith(targetKey);
+ if (found) {
+ keyItems.add(keySyncOperation);
+ }
+ }
+ } else {
+ // this is not really expected...
+ Log_OC.d(TAG, "Canceling sync operation");
+ keyItems.add(buildRemoteName(account, file.getRemotePath()));
+ }