Skip to content

How to deal with hidden files during sync #167

Open

Description

@mlech-reef

When the source is B2 and the file is hidden, the file on the destination won't be deleted even with KeepOrDeleteMode.DELETE.

We should talk if it's expected behavior or maybe the file should be deleted when the destination file is local.
But when the destination file is B2 (bucket to bucket sync of the latest versions implemented in #165), then we may want to hide that file. It may require synchronizing not only the latest versions as described in #166

Activity

  1. ppolewicz commented on Oct 28, 2020

    @ppolewicz
    Collaborator

    I think it is a very old bug, which doesn't properly delete the local file if you sync a local folder to the cloud, remove a file from the cloud and sync back to the drive with --delete - you'd expect the local file to be deleted but it is kept due to a bug.

    As for bucket-to-bucket sync, in such situation the user might want to hide the object on destination or delete the object on destination when the object is not present on the source. We just need an appropraite set of options for the user to decide what should be done. Could you suggest something?

  2. mlech-reef commented on Oct 29, 2020

    @mlech-reef
    CollaboratorAuthor

    So if we consider it as a bug, then we can:

    • Fix it ;)
    • Add --hide argument for the sync which is mutually-exclusive with --delete and in SDK is reflected by a new KeepOrDeleteMode.HIDE value. The new parameter is allowed only when the destination is b2. Fully BC.

    For better readability as the number of arguments in sync is growing, we can present them in different groups instead of the default optional arguments group.

  3. ppolewicz commented on Nov 8, 2020

    @ppolewicz
    Collaborator

    Argparse has Mutual exclusion support for arguments which may come in handy here.

    I think we should add --hide and it should be promoted in examples of b2b sync.

    @bwbeach - do we want to fix this? The most questionable issue is that so far the files missing (or hidden) from the source were kept after sync from cloud to local, even with --delete.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions