projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More polite return for menus
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
operations
/
RemoveFileOperation.java
diff --git
a/src/com/owncloud/android/operations/RemoveFileOperation.java
b/src/com/owncloud/android/operations/RemoveFileOperation.java
index
f1a28ba
..
69d0a6c
100644
(file)
--- a/
src/com/owncloud/android/operations/RemoveFileOperation.java
+++ b/
src/com/owncloud/android/operations/RemoveFileOperation.java
@@
-72,7
+72,11
@@
public class RemoveFileOperation extends RemoteOperation {
delete = new DeleteMethod(client.getBaseUri() + WebdavUtils.encodePath(mFileToRemove.getRemotePath()));
int status = client.executeMethod(delete, REMOVE_READ_TIMEOUT, REMOVE_CONNECTION_TIMEOUT);
if (delete.succeeded()) {
delete = new DeleteMethod(client.getBaseUri() + WebdavUtils.encodePath(mFileToRemove.getRemotePath()));
int status = client.executeMethod(delete, REMOVE_READ_TIMEOUT, REMOVE_CONNECTION_TIMEOUT);
if (delete.succeeded()) {
- mDataStorageManager.removeFile(mFileToRemove, mDeleteLocalCopy);
+ if (mFileToRemove.isDirectory()) {
+ mDataStorageManager.removeDirectory(mFileToRemove, true, mDeleteLocalCopy);
+ } else {
+ mDataStorageManager.removeFile(mFileToRemove, mDeleteLocalCopy);
+ }
}
delete.getResponseBodyAsString(); // exhaust the response, although not interesting
result = new RemoteOperationResult(delete.succeeded(), status);
}
delete.getResponseBodyAsString(); // exhaust the response, although not interesting
result = new RemoteOperationResult(delete.succeeded(), status);