X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/ac685690a2bf019d2978082debe62ec6aea0a69f..c54d7e35d0efb3d1352ff6d1330cac185bef0a21:/src/com/owncloud/android/operations/SynchronizeFolderOperation.java?ds=sidebyside diff --git a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java index 75e193af..b8da4a1f 100644 --- a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java @@ -60,7 +60,8 @@ import java.util.concurrent.atomic.AtomicBoolean; * Fetches the list and properties of the files contained in the given folder, including their * properties, and updates the local database with them. * - * Does NOT enter in the child folders to synchronize their contents also. + * Does NOT enter in the child folders to synchronize their contents also, BUT requests for a new operation instance + * doing so. */ public class SynchronizeFolderOperation extends SyncOperation { @@ -96,9 +97,6 @@ public class SynchronizeFolderOperation extends SyncOperation { private List mFilesForDirectDownload; // to avoid extra PROPFINDs when there was no change in the folder - private List mFilesToSyncContentsWithoutUpload; - // this will go out when 'folder synchronization' replaces 'folder download'; step by step - private List mFilesToSyncContents; // this will be used for every file when 'folder synchronization' replaces 'folder download' @@ -120,7 +118,6 @@ public class SynchronizeFolderOperation extends SyncOperation { mContext = context; mRemoteFolderChanged = false; mFilesForDirectDownload = new Vector(); - mFilesToSyncContentsWithoutUpload = new Vector(); mFilesToSyncContents = new Vector(); mCancellationRequested = new AtomicBoolean(false); } @@ -281,7 +278,7 @@ public class SynchronizeFolderOperation extends SyncOperation { FileDataStorageManager storageManager = getStorageManager(); // parse data from remote folder - OCFile remoteFolder = fillOCFile((RemoteFile)folderAndFiles.get(0)); + OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile) folderAndFiles.get(0)); remoteFolder.setParentId(mLocalFolder.getParentId()); remoteFolder.setFileId(mLocalFolder.getFileId()); @@ -290,7 +287,6 @@ public class SynchronizeFolderOperation extends SyncOperation { List updatedFiles = new Vector(folderAndFiles.size() - 1); mFilesForDirectDownload.clear(); - mFilesToSyncContentsWithoutUpload.clear(); mFilesToSyncContents.clear(); if (mCancellationRequested.get()) { @@ -306,49 +302,52 @@ public class SynchronizeFolderOperation extends SyncOperation { } // loop to synchronize every child - OCFile remoteFile = null, localFile = null; + OCFile remoteFile = null, localFile = null, updatedFile = null; + RemoteFile r; for (int i=1; i