Skip to content

Propagate TUS upload body errors and close file handles#157

Open
zerox80 wants to merge 3 commits into
opencloud-eu:mainfrom
zerox80:zerox80/fix-tus-upload-body-errors
Open

Propagate TUS upload body errors and close file handles#157
zerox80 wants to merge 3 commits into
opencloud-eu:mainfrom
zerox80:zerox80/fix-tus-upload-body-errors

Conversation

@zerox80
Copy link
Copy Markdown
Contributor

@zerox80 zerox80 commented May 12, 2026

Summary

  • propagate request body read and write failures during TUS uploads
  • close the file handle used for creation-with-upload after the request completes
  • preserve existing upload behavior for successful requests

Tests

  • Added coverage for TUS body error propagation
  • Added coverage for creation-with-upload resource cleanup

@guruz
Copy link
Copy Markdown
Contributor

guruz commented May 15, 2026

detekt failed, haven't looked at it ^

@guruz
Copy link
Copy Markdown
Contributor

guruz commented May 18, 2026

> Task :opencloudComLibrary:detekt FAILED
/home/runner/work/android/android/opencloudComLibrary/src/main/java/eu/opencloud/android/lib/resources/files/tus/CreateTusUploadRemoteOperation.kt:49:18: The function run is too long (104). The maximum length is 100. [LongMethod]

@guruz
Copy link
Copy Markdown
Contributor

guruz commented May 18, 2026

Just curious, did you see this fixing an issue in the wild or is it just a preemptive fix?

@zerox80
Copy link
Copy Markdown
Contributor Author

zerox80 commented May 18, 2026

haven't had issues before i think, just a improvement fix from a static code review with backend context

@zerox80 zerox80 force-pushed the zerox80/fix-tus-upload-body-errors branch from f20a8d3 to a054814 Compare May 18, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants