Loading src/com/owncloud/android/lib/common/operations/RemoteOperationResult.java +7 −2 Original line number Diff line number Diff line Loading @@ -390,10 +390,15 @@ public class RemoteOperationResult implements Serializable { } else if (mCode == ResultCode.ACCOUNT_NOT_THE_SAME) { return "Authenticated with a different account than the one updating"; } else if (mCode == ResultCode.INVALID_CHARACTER_IN_NAME) { return "The file name contains an forbidden character"; } else if (mCode == ResultCode.FILE_NOT_FOUND) { return "Local file does not exist"; } else if (mCode == ResultCode.SYNC_CONFLICT) { return "Synchronization conflict"; } return "Operation finished with HTTP status code " + mHttpCode + " (" + Loading src/com/owncloud/android/lib/common/utils/Log_OC.java +1 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,7 @@ public class Log_OC { } public static void i(String TAG, String message){ // Write the log message to the file Log.i(TAG, message); appendLog(TAG+" : "+ message); } Loading src/com/owncloud/android/lib/resources/files/ChunkedUploadRemoteFileOperation.java +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class ChunkedUploadRemoteFileOperation extends UploadRemoteFileOperation } @Override protected int uploadFile(OwnCloudClient client) throws HttpException, IOException { protected int uploadFile(OwnCloudClient client) throws IOException { int status = -1; FileChannel channel = null; Loading src/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.java +3 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,9 @@ public class DownloadRemoteFileOperation extends RemoteOperation { if (transferred == totalToTransfer) { // Check if the file is completed savedFile = true; Header modificationTime = mGet.getResponseHeader("Last-Modified"); if (modificationTime == null) { modificationTime = mGet.getResponseHeader("last-modified"); } if (modificationTime != null) { Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue()); mModificationTimestamp = (d != null) ? d.getTime() : 0; Loading src/com/owncloud/android/lib/resources/files/UploadRemoteFileOperation.java +2 −4 Original line number Diff line number Diff line Loading @@ -102,8 +102,7 @@ public class UploadRemoteFileOperation extends RemoteOperation { (mPutMethod != null ? mPutMethod.getResponseHeaders() : null)); } } catch (Exception e) { // TODO something cleaner with cancellations if (mCancellationRequested.get()) { if (mCancellationRequested.get() && !(e instanceof OperationCancelledException)) { result = new RemoteOperationResult(new OperationCancelledException()); } else { result = new RemoteOperationResult(e); Loading @@ -117,8 +116,7 @@ public class UploadRemoteFileOperation extends RemoteOperation { status == HttpStatus.SC_NO_CONTENT)); } protected int uploadFile(OwnCloudClient client) throws HttpException, IOException, OperationCancelledException { protected int uploadFile(OwnCloudClient client) throws IOException { int status = -1; try { File f = new File(mLocalPath); Loading Loading
src/com/owncloud/android/lib/common/operations/RemoteOperationResult.java +7 −2 Original line number Diff line number Diff line Loading @@ -390,10 +390,15 @@ public class RemoteOperationResult implements Serializable { } else if (mCode == ResultCode.ACCOUNT_NOT_THE_SAME) { return "Authenticated with a different account than the one updating"; } else if (mCode == ResultCode.INVALID_CHARACTER_IN_NAME) { return "The file name contains an forbidden character"; } else if (mCode == ResultCode.FILE_NOT_FOUND) { return "Local file does not exist"; } else if (mCode == ResultCode.SYNC_CONFLICT) { return "Synchronization conflict"; } return "Operation finished with HTTP status code " + mHttpCode + " (" + Loading
src/com/owncloud/android/lib/common/utils/Log_OC.java +1 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,7 @@ public class Log_OC { } public static void i(String TAG, String message){ // Write the log message to the file Log.i(TAG, message); appendLog(TAG+" : "+ message); } Loading
src/com/owncloud/android/lib/resources/files/ChunkedUploadRemoteFileOperation.java +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class ChunkedUploadRemoteFileOperation extends UploadRemoteFileOperation } @Override protected int uploadFile(OwnCloudClient client) throws HttpException, IOException { protected int uploadFile(OwnCloudClient client) throws IOException { int status = -1; FileChannel channel = null; Loading
src/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.java +3 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,9 @@ public class DownloadRemoteFileOperation extends RemoteOperation { if (transferred == totalToTransfer) { // Check if the file is completed savedFile = true; Header modificationTime = mGet.getResponseHeader("Last-Modified"); if (modificationTime == null) { modificationTime = mGet.getResponseHeader("last-modified"); } if (modificationTime != null) { Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue()); mModificationTimestamp = (d != null) ? d.getTime() : 0; Loading
src/com/owncloud/android/lib/resources/files/UploadRemoteFileOperation.java +2 −4 Original line number Diff line number Diff line Loading @@ -102,8 +102,7 @@ public class UploadRemoteFileOperation extends RemoteOperation { (mPutMethod != null ? mPutMethod.getResponseHeaders() : null)); } } catch (Exception e) { // TODO something cleaner with cancellations if (mCancellationRequested.get()) { if (mCancellationRequested.get() && !(e instanceof OperationCancelledException)) { result = new RemoteOperationResult(new OperationCancelledException()); } else { result = new RemoteOperationResult(e); Loading @@ -117,8 +116,7 @@ public class UploadRemoteFileOperation extends RemoteOperation { status == HttpStatus.SC_NO_CONTENT)); } protected int uploadFile(OwnCloudClient client) throws HttpException, IOException, OperationCancelledException { protected int uploadFile(OwnCloudClient client) throws IOException { int status = -1; try { File f = new File(mLocalPath); Loading