remove unnecessary autoRenameFile, ocupload already renaming, fix tests

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-09-25 16:09:07 +02:00 committed by Alper Öztürk
parent d093e67adb
commit 1aebf6a8f3

View file

@ -1020,8 +1020,6 @@ public class UploadFileOperation extends SyncOperation {
updateSize(size); updateSize(size);
autoRenameFile();
// perform the upload // perform the upload
if (size > ChunkedFileUploadRemoteOperation.CHUNK_SIZE_MOBILE) { if (size > ChunkedFileUploadRemoteOperation.CHUNK_SIZE_MOBILE) {
boolean onWifiConnection = connectivityService.getConnectivity().isWifi(); boolean onWifiConnection = connectivityService.getConnectivity().isWifi();
@ -1113,12 +1111,6 @@ public class UploadFileOperation extends SyncOperation {
return result; return result;
} }
private void autoRenameFile() {
String newFilename = AutoRename.INSTANCE.rename(mFile.getFileName(), getCapabilities(), false);
mFile.setFileName(newFilename);
getStorageManager().saveFile(mFile);
}
private void updateSize(long size) { private void updateSize(long size) {
OCUpload ocUpload = uploadsStorageManager.getUploadById(getOCUploadId()); OCUpload ocUpload = uploadsStorageManager.getUploadById(getOCUploadId());
if (ocUpload != null) { if (ocUpload != null) {