1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-08 00:16:09 +00:00

Remove exhaust response in RenameRemoteFileOperation

This commit is contained in:
masensio 2015-06-03 11:09:32 +02:00
parent 16c9147383
commit b8a3eb059c

View File

@ -106,14 +106,16 @@ public class RenameRemoteFileOperation extends RemoteOperation {
move = new LocalMoveMethod( client.getWebdavUri() + move = new LocalMoveMethod( client.getWebdavUri() +
WebdavUtils.encodePath(mOldRemotePath), WebdavUtils.encodePath(mOldRemotePath),
client.getWebdavUri() + WebdavUtils.encodePath(mNewRemotePath)); 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) { if (status == 400) {
result = new RemoteOperationResult(move.succeeded(), result = new RemoteOperationResult(move.succeeded(),
move.getResponseBodyAsString(), status); move.getResponseBodyAsString(), status);
Log_OC.d(TAG, move.getResponseBodyAsString()); Log_OC.d(TAG, move.getResponseBodyAsString());
} else { } else {
move.getResponseBodyAsString(); // exhaust response, although not interesting client.exhaustResponse(move.getResponseBodyAsStream());//exhaust response,
// although not interesting
result = new RemoteOperationResult(move.succeeded(), status, result = new RemoteOperationResult(move.succeeded(), status,
move.getResponseHeaders()); move.getResponseHeaders());
Log_OC.i(TAG, "Rename " + mOldRemotePath + " to " + mNewRemotePath + ": " + Log_OC.i(TAG, "Rename " + mOldRemotePath + " to " + mNewRemotePath + ": " +