Explorar o código

Silently handle remote folders removed while a full account refresh is run

David A. Velasco %!s(int64=9) %!d(string=hai) anos
pai
achega
854d333bd8
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      src/com/owncloud/android/syncadapter/FileSyncAdapter.java

+ 5 - 2
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
             
     }