Skip to content

Wrong access to files when a connection has been re-added #435

@SailReal

Description

@SailReal

Please agree to the following

Summary

Wrong access to files when a connection has been removed and another connection added of the same type

System Setup

- Android: X
- Cryptomator: Y

Cloud Type

No response

Steps to Reproduce

  1. Add a cloud connection of type a
  2. Browse files using this cloud connection
  3. Remove this cloud connection
  4. Add another cloud connection of this type a (make sure that you don't kill the app after deleting the cloud)
  5. Browse files using this new cloud connection

Expected Behavior

Files of the new cloud connection are shown

Actual Behavior

Files of the deleted cloud connection are shown

Reproducibility

Always

Relevant Log Output

No response

Anything else?

The reason for this is that when browsing a cloud connection, an entry is created in a map of the DispatchingCloudContentRepository, when a cloud connection is removed in the database using the CloudRepositoryImpl, the entry in the DispatchingCloudContentRepository isn't removed. This is fixed in 85c0658 by updating the entries in DispatchingCloudContentRepository as well when removing a cloud in the database.

As the DispatchingCloudContentRepository is in memory, the app must not be killed after deleting the cloud and the files must be browsed with the old cloud connection before it was deleted, otherwise the problem does not occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions