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
filter: exclude=d/ should behave alike what exclude=d/** does #3375
Milestone
Comments
ncw
changed the title
exclude=d/ should behave alike what exclude=d/** does
filter: exclude=d/ should behave alike what exclude=d/** does
Jul 29, 2019
ncw
added a commit
that referenced
this issue
Oct 27, 2020
Rclone uses directory exclusions to cut down the listing it has to do, so before this fix `--exclude dir/` would make sure nothing in `dir/` was scanned, **except** if --fast-list was used, in which case only the directory was excluded and everything within it was included. This is rather unexpected, so this patch makes `--exclude dir/` be equivalent to `--exclude dir/**`, meaning that excluding a directory excludes it and its contents. We can't do the same for --include without changing the semantics of filtering slightly. Fixes #3375
I've made an implementation of this here v1.54.0-beta.4847.51e810828.fix-3375-filter-dir on branch fix-3375-filter-dir (uploaded in 15-30 mins) |
Closed after 4 months of inactivity |
ncw
added a commit
that referenced
this issue
Feb 7, 2021
Rclone uses directory exclusions to cut down the listing it has to do, so before this fix `--exclude dir/` would make sure nothing in `dir/` was scanned, **except** if --fast-list was used, in which case only the directory was excluded and everything within it was included. This is rather unexpected, so this patch makes `--exclude dir/` be equivalent to `--exclude dir/**`, meaning that excluding a directory excludes it and its contents. We can't do the same for --include without changing the semantics of filtering slightly. Fixes #3375
Thanks @ivandeex - I've now merged the above and deleted the branch! |
This was referenced Feb 18, 2021
negative0
pushed a commit
to negative0/rclone
that referenced
this issue
Aug 13, 2021
Rclone uses directory exclusions to cut down the listing it has to do, so before this fix `--exclude dir/` would make sure nothing in `dir/` was scanned, **except** if --fast-list was used, in which case only the directory was excluded and everything within it was included. This is rather unexpected, so this patch makes `--exclude dir/` be equivalent to `--exclude dir/**`, meaning that excluding a directory excludes it and its contents. We can't do the same for --include without changing the semantics of filtering slightly. Fixes rclone#3375
This was referenced Oct 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As discussed in the forum,
--exclude d/
and--exclude 'd/**'
works differently and this difference causessync
/copy
mistakenly delete some files on the remote when--fast-list
is ON.Making
--exclude=d/
works alike--exclude=d/**
would be OK.The text was updated successfully, but these errors were encountered: