forked from TrueCloudLab/rclone
filter: emit INFO message when can't work out directory filters
See: https://forum.rclone.org/t/rclone-scans-unwanted-folder/34437
This commit is contained in:
parent
d4ea6632ca
commit
adbcc83fa5
1 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/rclone/rclone/fs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GlobToRegexp converts an rsync style glob to a regexp
|
// GlobToRegexp converts an rsync style glob to a regexp
|
||||||
|
@ -175,6 +177,7 @@ var (
|
||||||
func globToDirGlobs(glob string) (out []string) {
|
func globToDirGlobs(glob string) (out []string) {
|
||||||
if tooHardRe.MatchString(glob) {
|
if tooHardRe.MatchString(glob) {
|
||||||
// Can't figure this one out so return any directory might match
|
// Can't figure this one out so return any directory might match
|
||||||
|
fs.Infof(nil, "Can't figure out directory filters from %q: looking in all directories", glob)
|
||||||
out = append(out, "/**")
|
out = append(out, "/**")
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue