We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ef2b06 commit 3416ef3Copy full SHA for 3416ef3
1 file changed
app/src/main/java/com/nextcloud/client/jobs/autoUpload/AutoUploadWorker.kt
@@ -405,18 +405,14 @@ class AutoUploadWorker(
405
return null
406
}
407
408
- var upload = try {
409
- (uploadEntity?.toOCUpload(null) ?: OCUpload(localPath, remotePath, user.accountName))
+ val upload = try {
+ uploadEntity?.toOCUpload(null) ?: OCUpload(localPath, remotePath, user.accountName)
410
} catch (_: IllegalArgumentException) {
411
- null
412
- }
413
-
414
- if (upload == null) {
415
Log_OC.e(TAG, "cannot construct oc upload")
416
417
418
419
- upload = upload.apply {
+ upload.apply {
420
uploadStatus = UploadsStorageManager.UploadStatus.UPLOAD_IN_PROGRESS
421
nameCollisionPolicy = syncedFolder.nameCollisionPolicy
422
isUseWifiOnly = needsWifi
0 commit comments