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 'develop' into share_password_support
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
operations
/
MoveFileOperation.java
diff --git
a/src/com/owncloud/android/operations/MoveFileOperation.java
b/src/com/owncloud/android/operations/MoveFileOperation.java
index
a4838ec
..
3a1103b
100644
(file)
--- a/
src/com/owncloud/android/operations/MoveFileOperation.java
+++ b/
src/com/owncloud/android/operations/MoveFileOperation.java
@@
-1,5
+1,8
@@
-/* ownCloud Android client application
- * Copyright (C) 2012-2014 ownCloud Inc.
+/**
+ * ownCloud Android client application
+ *
+ * @author David A. Velasco
+ * Copyright (C) 2015 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,
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
@@
-29,8
+32,6
@@
import android.accounts.Account;
/**
* Operation mmoving an {@link OCFile} to a different folder.
/**
* Operation mmoving an {@link OCFile} to a different folder.
- *
- * @author David A. Velasco
*/
public class MoveFileOperation extends SyncOperation {
*/
public class MoveFileOperation extends SyncOperation {
@@
-80,6
+81,9
@@
public class MoveFileOperation extends SyncOperation {
/// 2. remote move
String targetPath = mTargetParentPath + mFile.getFileName();
/// 2. remote move
String targetPath = mTargetParentPath + mFile.getFileName();
+ if (mFile.isFolder()) {
+ targetPath += OCFile.PATH_SEPARATOR;
+ }
MoveRemoteFileOperation operation = new MoveRemoteFileOperation(
mSrcPath,
targetPath,
MoveRemoteFileOperation operation = new MoveRemoteFileOperation(
mSrcPath,
targetPath,
@@
-89,8
+93,7
@@
public class MoveFileOperation extends SyncOperation {
/// 3. local move
if (result.isSuccess()) {
/// 3. local move
if (result.isSuccess()) {
- // TODO work in progress
- //getStorageManager().moveLocalFile(mFile, targetPath);
+ getStorageManager().moveLocalFile(mFile, targetPath, mTargetParentPath);
}
// TODO handle ResultCode.PARTIAL_MOVE_DONE in client Activity, for the moment
}
// TODO handle ResultCode.PARTIAL_MOVE_DONE in client Activity, for the moment