Explorar o código

Revert "DownloadFileOperation: use moveFile instead of File.renameTo"

This reverts commit f18f72abcddf91c6fd08d2a99765bca5d3dfdcbe.

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
Álvaro Brey Vilas %!s(int64=3) %!d(string=hai) anos
pai
achega
41dbdaf3ed

+ 1 - 3
src/main/java/com/owncloud/android/operations/DownloadFileOperation.java

@@ -23,7 +23,6 @@ package com.owncloud.android.operations;
 
 import android.accounts.Account;
 import android.content.Context;
-import android.os.FileUtils;
 import android.text.TextUtils;
 import android.webkit.MimeTypeMap;
 
@@ -204,8 +203,7 @@ public class DownloadFileOperation extends RemoteOperation {
                     return new RemoteOperationResult(e);
                 }
             }
-
-            moved = FileStorageUtils.moveFile(tmpFile, newFile);
+            moved = tmpFile.renameTo(newFile);
             newFile.setLastModified(file.getModificationTimestamp());
             if (!moved) {
                 result = new RemoteOperationResult(RemoteOperationResult.ResultCode.LOCAL_STORAGE_NOT_MOVED);