From 854d333bd8f39fe76d62bf267ca17e4527560b06 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Wed, 18 Nov 2015 09:29:15 +0100 Subject: [PATCH] Silently handle remote folders removed while a full account refresh is run --- src/com/owncloud/android/syncadapter/FileSyncAdapter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java index 7dfe5201..f04c8dac 100644 --- a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java @@ -298,7 +298,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { syncChildren(children); } - } else { + } else if (result.getCode() != ResultCode.FILE_NOT_FOUND) { // in failures, the statistics for the global result are updated if ( result.getCode() == RemoteOperationResult.ResultCode.UNAUTHORIZED || result.isIdPRedirection() @@ -313,7 +313,10 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { } mFailedResultsCounter++; mLastFailedResult = result; - } + + } // else, ResultCode.FILE_NOT_FOUND is ignored, remote folder was + // removed from other thread or other client during the synchronization, + // before this thread fetched its contents } -- 2.11.0