Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a sharing bug with sharing dir not created #4254

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

nono
Copy link
Member

@nono nono commented Dec 7, 2023

Scenario:

  1. The URL of Bob's Cozy is known by Alice's Cozy from a previous sharing
  2. Alice creates a directory Foo and puts a file Bar inside it
  3. Alice sends a sharing invitation for this directory to Bob
  4. Alice deletes the Bar file making Foo empty
  5. Bob accepts to synchronize the sharing on their Cozy

Expected: the shortcut for the sharing on Bob's Cozy is replaced by an empty Foo directory
Actual: it doesn't happen because initial_number_of_files_to_sync is computed when the sharing is created, and no file is shared.

This fix ensures that the sharing directory exists when the initial synchronization is done (by creating it if needed).

Scenario:

1. The URL of Bob's Cozy is known by Alice's Cozy from a previous
   sharing
2. Alice creates a directory Foo and puts a file Bar inside it
3. Alice sends a sharing invitation for this directory to Bob
4. Alice deletes the Bar file making Foo empty
5. Bob accepts to synchronize the sharing on their Cozy

Expected: the shortcut for the sharing on Bob's Cozy is replaced by an
empty Foo directory
Actual: it doesn't happen because initial_number_of_files_to_sync is
computed when the sharing is created, and no file is shared.

This fix ensures that the sharing directory exists when the initial
synchronization is done (by creating it if needed).
@nono nono requested a review from a team as a code owner December 7, 2023 13:01
@nono nono merged commit 16ecffc into master Dec 7, 2023
6 checks passed
@nono nono deleted the fix-sharing-empty-dir branch December 7, 2023 14:20
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