projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #364 from owncloud/share_link__code_improvements
[pub/Android/ownCloud.git]
/
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
497058a
..
0aae4a9
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
@@
-192,7
+192,7
@@
public class SynchronizeFolderOperation extends RemoteOperation {
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath);
result = operation.execute(client);
if (result.isSuccess()){
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath);
result = operation.execute(client);
if (result.isSuccess()){
- OCFile remoteFolder = FileStorageUtils.fillOCFile(result.getData().get(0));
+ OCFile remoteFolder = FileStorageUtils.fillOCFile(
(RemoteFile)
result.getData().get(0));
// check if remote and local folder are different
mRemoteFolderChanged = !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
// check if remote and local folder are different
mRemoteFolderChanged = !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
@@
-223,7
+223,11
@@
public class SynchronizeFolderOperation extends RemoteOperation {
Log_OC.d(TAG, "Synchronizing " + mAccount.name + remotePath);
if (result.isSuccess()) {
Log_OC.d(TAG, "Synchronizing " + mAccount.name + remotePath);
if (result.isSuccess()) {
- synchronizeData(result.getData(), client);
+ ArrayList<RemoteFile> remotes = new ArrayList<RemoteFile>();
+ for(Object obj: result.getData()) {
+ remotes.add((RemoteFile) obj);
+ }
+ synchronizeData(remotes, client);
if (mConflictsFound > 0 || mFailsInFavouritesFound > 0) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT); // should be different result, but will do the job
}
if (mConflictsFound > 0 || mFailsInFavouritesFound > 0) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT); // should be different result, but will do the job
}