Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e08c74f authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Update log for Download failure in case of override

parent 0633ca26
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;
        }