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

Selective sync may not locally remove unneeded files #5783

Closed
ckamm opened this issue May 19, 2017 · 3 comments
Closed

Selective sync may not locally remove unneeded files #5783

ckamm opened this issue May 19, 2017 · 3 comments
Assignees
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Milestone

Comments

@ckamm
Copy link
Contributor

ckamm commented May 19, 2017

When a folder is removed from the sync by deselecting it in the selective sync ui, typically it is deleted locally. However, when there are new, conflicting or untracked files inside the folder, nothing at all is done with it. Discussions with @ogoffart suggest that removing all subitems that are safe to remove may be more desirable.

Steps to reproduce:

  • Inside a synced folder, create a folder foo/ containing foo/uptodate, foo/subfolder/uptodate.
  • Fully sync it, then pause the sync
  • Create a new file foo/newfile
  • Open selective sync and deselect foo/
  • Unpause the sync

Expected: foo/uptodate, foo/subfolder/uptodate and foo/subfolder should be removed
Actual: Nothing is removed

This behavior is the result of checkForPermission(): All subitems inside a selective-sync ignored folder get set to IGNORED. But even if they weren't: as long as the parent is IGNORED subjobs are not executed in PropagateDirectory.

@ogoffart
Copy link
Contributor

Test case in TestSyncEngine::testSelectiveSyncBug : parentFolder/subFolder/fileA.txt should be deleted but it is not.

@guruz
Copy link
Contributor

guruz commented May 22, 2017

What would be the milestonde for this @ogoffart @ckamm ?

@ogoffart ogoffart added this to the 2.4.0 milestone May 22, 2017
@ogoffart ogoffart self-assigned this May 29, 2017
ogoffart added a commit that referenced this issue Jun 6, 2017
…spite other modified files

Issue #5783

When the directry that should be removed by selective sync contains changes,
we ignore the whole sub tree instead of only ignoreing new files.
We cannot ignore the whole directory, we need to ignore only the directory
that do not have files to remove
ogoffart added a commit that referenced this issue Jun 7, 2017
…spite other modified files

Issue #5783

When the directry that should be removed by selective sync contains changes,
we ignore the whole sub tree instead of only ignoreing new files.
We cannot ignore the whole directory, we need to ignore only the directory
that do not have files to remove
ogoffart added a commit that referenced this issue Jun 8, 2017
…spite other modified files

Issue #5783

When the directry that should be removed by selective sync contains changes,
we ignore the whole sub tree instead of only ignoreing new files.
We cannot ignore the whole directory, we need to ignore only the directory
that do not have files to remove
@ogoffart ogoffart added the ReadyToTest QA, please validate the fix/enhancement label Jun 8, 2017
@ckamm
Copy link
Contributor Author

ckamm commented Oct 11, 2017

I've tested it using the test case from the initial comment

@ckamm ckamm closed this as completed Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Projects
None yet
Development

No branches or pull requests

3 participants