X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/1998cc68d6586c6a0b4bc4c9be42b48d17fa5ba7..495fd6e4041c6ed933022e49d1aee0a30a9d6f76:/src/com/owncloud/android/operations/SynchronizeFolderOperation.java diff --git a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java index d2d6c373..e4f96620 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,10 +97,7 @@ 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 mFavouriteFilesToSyncContents; + private List mFilesToSyncContents; // this will be used for every file when 'folder synchronization' replaces 'folder download' private final AtomicBoolean mCancellationRequested; @@ -120,8 +118,7 @@ public class SynchronizeFolderOperation extends SyncOperation { mContext = context; mRemoteFolderChanged = false; mFilesForDirectDownload = new Vector(); - mFilesToSyncContentsWithoutUpload = new Vector(); - mFavouriteFilesToSyncContents = 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,8 +287,7 @@ public class SynchronizeFolderOperation extends SyncOperation { List updatedFiles = new Vector(folderAndFiles.size() - 1); mFilesForDirectDownload.clear(); - mFilesToSyncContentsWithoutUpload.clear(); - mFavouriteFilesToSyncContents.clear(); + mFilesToSyncContents.clear(); if (mCancellationRequested.get()) { throw new OperationCancelledException(); @@ -305,85 +301,77 @@ 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