Skip to content

Commit

Permalink
remove unnecessary autoRenameFile, ocupload already renaming, fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Sep 25, 2024
1 parent 9298986 commit bf09a72
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,6 @@ private RemoteOperationResult normalUpload(OwnCloudClient client) {

updateSize(size);

autoRenameFile();

// perform the upload
if (size > ChunkedFileUploadRemoteOperation.CHUNK_SIZE_MOBILE) {
boolean onWifiConnection = connectivityService.getConnectivity().isWifi();
Expand Down Expand Up @@ -1113,12 +1111,6 @@ private RemoteOperationResult normalUpload(OwnCloudClient client) {
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) {
OCUpload ocUpload = uploadsStorageManager.getUploadById(getOCUploadId());
if (ocUpload != null) {
Expand Down

0 comments on commit bf09a72

Please sign in to comment.