mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 14:45:47 +03:00
remove unnecessary autoRenameFile, ocupload already renaming, fix tests
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
d093e67adb
commit
1aebf6a8f3
1 changed files with 0 additions and 8 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue