Skip to content

Commit b574845

Browse files
alperozturk96backportbot[bot]
authored andcommitted
fix: check exception during auto upload for non-existing file
Signed-off-by: alperozturk <[email protected]>
1 parent 4a347c8 commit b574845

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/main/java/com/nextcloud/client/jobs/autoUpload/AutoUploadWorker.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ class AutoUploadWorker(
367367
"Exception during upload file, localPath: $localPath, remotePath: $remotePath," +
368368
" exception: $e"
369369
)
370+
371+
if (path.isEmpty() || !file.exists()) {
372+
Log_OC.w(TAG, "detected non-existing local file, removing entity")
373+
deleteNonExistingFile(path, id, upload)
374+
continue
375+
}
370376
}
371377
} catch (e: Exception) {
372378
Log_OC.e(

0 commit comments

Comments
 (0)