Skip to content

Selective sync may not locally remove unneeded files #5783

Closed

Description

@ckamm

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.

Activity

  1. ogoffart commented on May 22, 2017

    @ogoffart
    Contributor

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

  2. guruz commented on May 22, 2017

    @guruz
    Contributor

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

  3. added this to the 2.4.0 milestone on May 22, 2017
  4. self-assigned this
    on May 29, 2017
  5. added
    ReadyToTest
    on Jun 8, 2017
  6. ckamm commented on Oct 11, 2017

    @ckamm
    ContributorAuthor

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

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

Metadata

Metadata

Assignees

Labels

ReadyToTesttype:bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions