File tree Expand file tree Collapse file tree
app/src/main/java/com/nextcloud Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import com.nextcloud.client.jobs.upload.FileUploadWorker
2626import com.nextcloud.client.jobs.utils.UploadErrorNotificationManager
2727import com.nextcloud.client.network.ConnectivityService
2828import com.nextcloud.client.preferences.SubFolderRule
29- import com.nextcloud.utils.extensions.isPermanentFailure
29+ import com.nextcloud.utils.extensions.isNonRetryable
3030import com.nextcloud.utils.extensions.updateStatus
3131import com.owncloud.android.R
3232import com.owncloud.android.datamodel.ArbitraryDataProviderImpl
@@ -416,11 +416,10 @@ class AutoUploadWorker(
416416 )
417417
418418 val lastUploadResult = uploadEntity?.lastResult?.let { UploadResult .fromValue(it) }
419- if (lastUploadResult?.isPermanentFailure () == true ) {
419+ if (lastUploadResult?.isNonRetryable () == true ) {
420420 Log_OC .w(
421421 TAG ,
422- " last upload failed with permanent failure, skipping auto-upload: $localPath ," +
423- " failure: ${lastUploadResult.value} "
422+ " last upload failed with ${lastUploadResult.value} , skipping auto-upload: $localPath "
424423 )
425424 return AutoUploadEntityResult .PermanentFailure
426425 }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ package com.nextcloud.utils.extensions
99
1010import com.owncloud.android.db.UploadResult
1111
12- fun UploadResult.isPermanentFailure (): Boolean = when (this ) {
12+ fun UploadResult.isNonRetryable (): Boolean = when (this ) {
1313 UploadResult .FILE_NOT_FOUND ,
1414 UploadResult .FILE_ERROR ,
1515 UploadResult .FOLDER_ERROR ,
@@ -26,6 +26,6 @@ fun UploadResult.isPermanentFailure(): Boolean = when (this) {
2626 // user's choice
2727 UploadResult .CANCELLED -> true
2828
29- // Everything else may succeed after retry
29+ // everything else may succeed after retry
3030 else -> false
3131}
You can’t perform that action at this time.
0 commit comments