What is the problem you are having with rclone?
No problem, just trying to understand implied --include **
filter with a view to clarifying documentation.
What is your rclone version (output from rclone version
)
1.53.2
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 20.4 ARM64
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run
See below
The rclone config contents with secrets removed.
[edrclone]
type = drive
client_id = xxxxx.apps.googleusercontent.com
client_secret = xxxxx
scope = drive
token = {"access_token":"xxxxxx"}
root_folder_id = xxxxxx
A log from the command with the -vv
flag
n/a
I have been looking at clarifying some points in the filter documentation page and got drawn into the implied + **
at the end of the rules in a file for --filter-from
. That behaves as I expected. Any object / path that has not matched a rule is included. That works whether or not there are any +
rules.
If there are no --include...
options on the command line an --include '**'
seems to be implied.
For instance with a test set in edrclone:test:
├── 1.docx
├── 2.docx
└── 3.docx
Listing without filters seems to use an implied --include '**'
:
ubuntu@ubuntu:~$ rclone ls edrclone:test
-1 3.docx
-1 2.docx
-1 1.docx
With an --exclude...
the implied include is still evident:
ubuntu@ubuntu:~$ rclone ls edrclone:test --exclude 3.docx
-1 2.docx
-1 1.docx
As soon as I add one (or more) --include...
the implied --include '**'
seems not to be applied:
ubuntu@ubuntu:~$ rclone ls edrclone:test --exclude 3.docx --include 1.docx
2020/11/04 12:06:00 ERROR : Using --filter is recommended instead of both --include and --exclude as the order they are parsed in is indeterminate
-1 1.docx
In spite of that ominous warning the --include...
and --exclude...
combinations I tried all seemed to predictably follow the rules for precedence of filter options set out in the existing documentation. The implied include still does not seem to be observed without the include / exclude clash, i.e.if there is just a single
--include...` option:
ubuntu@ubuntu:~$ rclone ls edrclone:test --include 1.docx
-1 1.docx
I have no opinion about what the behaviour should be - merely trying to get it unambiguous in the documentation. Is it true to say that there is an implied final +**
with --filter...
and implied --include '**'
on the command line but whenever there are one or more --include...
on the command line those two implied includes do not apply?
(Adding an --include...
to the command line also seems to negate the implied +**
in a --filter-from
but I have not provided the example here.)
(Behaviour seems to be consistent essentially between rclone 1.53.2 and 1.51.0)