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

How to deal with hidden files during sync #167

Open
mlech-reef opened this issue Oct 28, 2020 · 3 comments
Open

How to deal with hidden files during sync #167

mlech-reef opened this issue Oct 28, 2020 · 3 comments
Labels
question Further information is requested

Comments

@mlech-reef
Copy link
Collaborator

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

@mlech-reef mlech-reef added the question Further information is requested label Oct 28, 2020
@ppolewicz
Copy link
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?

@mlech-reef
Copy link
Collaborator Author

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.

@ppolewicz
Copy link
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
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants