X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/738ea33c060fdf1ebc30ae8cc952229bc59da979..aae90eb1aa42a11449e30330e3e23e1e9e5eebb6:/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 3176ba38..fc4a74e8 100644 --- a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java +++ b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java @@ -1,5 +1,5 @@ /* ownCloud Android client application - * Copyright (C) 2012-2013 ownCloud Inc. + * Copyright (C) 2012-2014 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -336,6 +336,8 @@ public class SynchronizeFolderOperation extends RemoteOperation { if (remoteFile.isFolder()) { remoteFile.setFileLength(localFile.getFileLength()); // TODO move operations about size of folders to FileContentProvider } + remoteFile.setPublicLink(localFile.getPublicLink()); + remoteFile.setShareByLink(localFile.isShareByLink()); } else { remoteFile.setEtag(""); // remote eTag will not be updated unless contents are synchronized (Synchronize[File|Folder]Operation with remoteFile as parameter) } @@ -348,11 +350,11 @@ public class SynchronizeFolderOperation extends RemoteOperation { if (remoteFile.keepInSync()) { SynchronizeFileOperation operation = new SynchronizeFileOperation( localFile, remoteFile, - mStorageManager, - mAccount, + mAccount, true, mContext ); + filesToSyncContents.add(operation); } @@ -380,7 +382,7 @@ public class SynchronizeFolderOperation extends RemoteOperation { private void startContentSynchronizations(List filesToSyncContents, OwnCloudClient client) { RemoteOperationResult contentsResult = null; for (SynchronizeFileOperation op: filesToSyncContents) { - contentsResult = op.execute(client); // returns without waiting for upload or download finishes + contentsResult = op.execute(mStorageManager, mContext); // returns without waiting for upload or download finishes if (!contentsResult.isSuccess()) { if (contentsResult.getCode() == ResultCode.SYNC_CONFLICT) { mConflictsFound++; @@ -414,6 +416,8 @@ public class SynchronizeFolderOperation extends RemoteOperation { file.setMimetype(remote.getMimeType()); file.setModificationTimestamp(remote.getModifiedTimestamp()); file.setEtag(remote.getEtag()); + file.setPermissions(remote.getPermissions()); + file.setRemoteId(remote.getRemoteId()); return file; }