Skip to content

Offline upload conflicts resolution overwrites the remote file even if the user select to keep both #17589

Description

@daniele-verducci

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Create a folder
  2. Upload a file (e.g. a text file)
  3. Go offline (e.g. airplane mode)
  4. Change the file (e.g. add some characters)
  5. Upload a second time the file
  6. Go online
  7. A conflict message is shown
  8. Choose to keep BOTH files
  9. The online file is overwritten by the new uploaded file (only one file present in the folder at the end)

Expected behaviour

The folder should contain two files: the remote one and the newly uploaded, renamed (as it happens if following the same steps without ever going offline).

Actual behaviour

The online file is overwritten by the new uploaded file (only one file present in the folder at the end)

Android version

17

Device brand and model

Emulator on Android Studio

Stock or custom OS?

Stock

Nextcloud android app version

35.0.0 RC1

Nextcloud server version

Nextcloud Hub 26 Spring (36.0.0 dev)

Using a reverse proxy?

No

Android logs

No response

Server error logs

Additional information

I think it's related to ConflictsResolveActivity having its own flow for offline uploads (see showOfflineOperationConflictDialog()) and passing Decision.KEEP_BOTH_FOLDER instead of KEEP_BOTH to the worker

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions