mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Remove exhaust response in RenameRemoteFileOperation
This commit is contained in:
parent
16c9147383
commit
b8a3eb059c
@ -106,14 +106,16 @@ public class RenameRemoteFileOperation extends RemoteOperation {
|
||||
move = new LocalMoveMethod( client.getWebdavUri() +
|
||||
WebdavUtils.encodePath(mOldRemotePath),
|
||||
client.getWebdavUri() + WebdavUtils.encodePath(mNewRemotePath));
|
||||
int status = client.executeMethod(move, RENAME_READ_TIMEOUT, RENAME_CONNECTION_TIMEOUT);
|
||||
int status = client.executeMethod(move, RENAME_READ_TIMEOUT,
|
||||
RENAME_CONNECTION_TIMEOUT);
|
||||
|
||||
if (status == 400) {
|
||||
result = new RemoteOperationResult(move.succeeded(),
|
||||
move.getResponseBodyAsString(), status);
|
||||
Log_OC.d(TAG, move.getResponseBodyAsString());
|
||||
} else {
|
||||
move.getResponseBodyAsString(); // exhaust response, although not interesting
|
||||
client.exhaustResponse(move.getResponseBodyAsStream());//exhaust response,
|
||||
// although not interesting
|
||||
result = new RemoteOperationResult(move.succeeded(), status,
|
||||
move.getResponseHeaders());
|
||||
Log_OC.i(TAG, "Rename " + mOldRemotePath + " to " + mNewRemotePath + ": " +
|
||||
|
Loading…
x
Reference in New Issue
Block a user