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 branch 'share_link_show_shared_files' into share_link__new_share
[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
0aae4a9
..
852b2ca
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
@@
-223,11
+223,7
@@
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()) {
- ArrayList<RemoteFile> remotes = new ArrayList<RemoteFile>();
- for(Object obj: result.getData()) {
- remotes.add((RemoteFile) obj);
- }
- synchronizeData(remotes, client);
+ synchronizeData(result.getData(), 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
}
@@
-260,12
+256,12
@@
public class SynchronizeFolderOperation extends RemoteOperation {
* retrieved.
* @return 'True' when any change was made in the local data, 'false' otherwise.
*/
* retrieved.
* @return 'True' when any change was made in the local data, 'false' otherwise.
*/
- private void synchronizeData(ArrayList<
RemoteFile
> folderAndFiles, OwnCloudClient client) {
+ private void synchronizeData(ArrayList<
Object
> folderAndFiles, OwnCloudClient client) {
// get 'fresh data' from the database
mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath());
// parse data from remote folder
// get 'fresh data' from the database
mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath());
// parse data from remote folder
- OCFile remoteFolder = fillOCFile(folderAndFiles.get(0));
+ OCFile remoteFolder = fillOCFile(
(RemoteFile)
folderAndFiles.get(0));
remoteFolder.setParentId(mLocalFolder.getParentId());
remoteFolder.setFileId(mLocalFolder.getFileId());
remoteFolder.setParentId(mLocalFolder.getParentId());
remoteFolder.setFileId(mLocalFolder.getFileId());
@@
-285,7
+281,7
@@
public class SynchronizeFolderOperation extends RemoteOperation {
OCFile remoteFile = null, localFile = null;
for (int i=1; i<folderAndFiles.size(); i++) {
/// new OCFile instance with the data from the server
OCFile remoteFile = null, localFile = null;
for (int i=1; i<folderAndFiles.size(); i++) {
/// new OCFile instance with the data from the server
- remoteFile = fillOCFile(folderAndFiles.get(i));
+ remoteFile = fillOCFile(
(RemoteFile)
folderAndFiles.get(i));
remoteFile.setParentId(mLocalFolder.getFileId());
/// retrieve local data for the read file
remoteFile.setParentId(mLocalFolder.getFileId());
/// retrieve local data for the read file