Skip to content

DocumentStorageProvider opens stale file contents #6883

Description

@jmue

If a file is locally available on the client and the server changes the content in the meantime, the document storage provider provides the available content while an internal content update is started at the same time.

Steps to reproduce:

  1. Create a text file with the content "Content"
  2. Open this file via the SAF and then close it afterwards
  3. Change the contents of the file on the server to "New Contents".
  4. Open the file again via SAF. Notice the content of "Contents".

You will also see Nextcloud notifications while downloading as you open the file the second time.

The problem here is with the SynchronizeFileOperation, which detects the conflict and calls the FileDownloader intent internally (which itself shows the notifications we want to remove).

To solve this we have to remove this SynchronizeFileOperation here as well, detect the conflict ourselves and start the file download as if no file is down.
This solution requires copying some code from SynchronizeFileOperation to our storage provider.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions