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

sync with filter #20

Open
Tasnim97 opened this issue Mar 15, 2021 · 2 comments
Open

sync with filter #20

Tasnim97 opened this issue Mar 15, 2021 · 2 comments

Comments

@Tasnim97
Copy link

I tried adding an --exclude flag when running with sync command and got Incorrect Usage: flag provided but not defined: -exclude and surely enough from help sync, --exclude is not in the options list. I was wondering, since this attempts to be a drop in replacement for s3cmd, if there are plans to allow filtering with the sync command in the future? It would be similar to s3cmd's (under Filtering with —exclude / —include rules)

@koblas
Copy link
Owner

koblas commented Mar 16, 2021

Good feature request.

Won't speak to the specifics of the timing, but yes.

@Tasnim97
Copy link
Author

Nice, looking forward for the release.

In the meantime if anyone is looking for a temporary solution, i've hardcoded my exclusion in my own build by modifying buildFileInfo function in cms_sync.go. First thing in the filter function given to filepath.Walk, add a condition that would match all the files and folders you intent to exclude and return nil. Also apparently WalkDir is more efficient than Walk according to this, but in my use case, couldn't tell the difference.

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

No branches or pull requests

2 participants