diff --git a/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java b/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java index 654fde1d8bd4d60fd5d4f090dee4a4ba89420f9c..5a3e9aa6d87e1bea3910d86037d1e3369d245a98 100644 --- a/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java +++ b/app/src/main/java/foundation/e/drive/operations/DownloadFileOperation.java @@ -122,8 +122,11 @@ public class DownloadFileOperation extends RemoteOperation { return FILE_NOT_FOUND; } - if (tmpFile.length() != remoteFile.getLength()) { - Timber.d("Local and remote version of %s doesn't match", remoteFile.getRemotePath()); + final long tmpFileSize = tmpFile.length(); + final long remoteFileSize = remoteFile.getLength(); + + if (tmpFileSize != remoteFileSize) { + Timber.d("Local file size (%s) and remote file size (%s) of %s doesn't match", tmpFileSize, remoteFileSize, remoteFile.getRemotePath()); tmpFile.delete(); return INVALID_OVERWRITE; }