fix(download): avoid divide by zero when file size is 0 - #6630
Merged
Conversation
otherwise download failed with error
2026-09-03 09:55:13.8612743-2796WM-WorkerWrappercom.nextcloud.talk2EWork [ id=6044ab54-1b6a-4024-9ed7-09435d65a87e, tags={
com.nextcloud.talk.jobs.DownloadFileToCacheWorker,14053871 } ] failed because it threw an exception/error (Fix with AI)
java.lang.ArithmeticException: divide by zero
at
com.nextcloud.talk.jobs.DownloadFileToCacheWorker.executeDownload(DownloadFileToCacheWorker.kt:117)
at
com.nextcloud.talk.jobs.DownloadFileToCacheWorker.downloadFile(DownloadFileToCacheWorker.kt:88)
at
com.nextcloud.talk.jobs.DownloadFileToCacheWorker.doWork(DownloadFileToCacheWorker.kt:75)
at androidx.work.Worker.startWork$lambda$0(Worker.kt:64)
at androidx.work.Worker$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at androidx.work.WorkerKt.future$lambda$2$lambda$1(Worker.kt:100)
at androidx.work.WorkerKt$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1100)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:1572)
Signed-off-by: Marcel Hibbe <marcel.hibbe@nextcloud.com>
Collaborator
Author
|
/backport to stable-25.0.x |
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/33732155682/artifacts/9885418307 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
otherwise download failed with error
馃弫 Checklist
/backport to stable-xx.x馃 AI (if applicable)