Skip to content

Conversation

@dmiales
Copy link

@dmiales dmiales commented Jan 2, 2026

Fix resource leaks and improve file upload collision handling

  • Fix Cursor resource leaks in UploadsStorageManager and FileDetailSharingFragment
    by adding proper try-finally blocks to ensure cursors are always closed

  • Improve file upload collision handling in UploadFileOperation

    • Add content comparison for non-encrypted files when SKIP policy is used
    • Report SYNC_CONFLICT when file with same name has different content
    • Preserve old behavior for encrypted files and edge cases
  • Change log level from warning to info for informational messages
    in AutoUploadWorker and UploadErrorNotificationManager

- Fix Cursor resource leaks in UploadsStorageManager and FileDetailSharingFragment by adding proper try-finally blocks to ensure cursors are always closed

- Improve file upload collision handling in UploadFileOperation

  - Add content comparison for non-encrypted files when SKIP policy is used

  - Report SYNC_CONFLICT when file with same name has different content

  - Preserve old behavior for encrypted files and edge cases

- Change log level from warning to info for informational messages in AutoUploadWorker and UploadErrorNotificationManager

Signed-off-by: dmiales <dmiales@gmail.com>
Copy link
Collaborator

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello

Thank you for the PR and for the work you’ve put into it.

Since this change touches multiple areas, including some critical components, we’d like to review and test it carefully. To help make the review process smoother and more focused, could you please consider splitting this PR into smaller, separate ones?

For example

UploadsStorageManager.java → cursor logic changes

UploadFileOperation.java → name-collision policy changes only

FileDetailSharingFragment.java → separate PR

This will help us review each change in isolation and ensure nothing is overlooked.
Thanks again for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants