mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix cache/uncache filters
This commit is contained in:
parent
99d4594ee8
commit
49952ba905
|
@ -141,12 +141,12 @@ func newFileFilter(remoteMountCommand *flag.FlagSet) (ff *FileFilter) {
|
||||||
func (ff *FileFilter) matches(entry *filer_pb.Entry) bool {
|
func (ff *FileFilter) matches(entry *filer_pb.Entry) bool {
|
||||||
if *ff.include != "" {
|
if *ff.include != "" {
|
||||||
if ok, _ := filepath.Match(*ff.include, entry.Name); !ok {
|
if ok, _ := filepath.Match(*ff.include, entry.Name); !ok {
|
||||||
return true
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if *ff.exclude != "" {
|
if *ff.exclude != "" {
|
||||||
if ok, _ := filepath.Match(*ff.exclude, entry.Name); ok {
|
if ok, _ := filepath.Match(*ff.exclude, entry.Name); ok {
|
||||||
return true
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if *ff.minSize != -1 {
|
if *ff.minSize != -1 {
|
||||||
|
@ -169,5 +169,5 @@ func (ff *FileFilter) matches(entry *filer_pb.Entry) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue