aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_remote_uncache.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_remote_uncache.go')
-rw-r--r--weed/shell/command_remote_uncache.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/shell/command_remote_uncache.go b/weed/shell/command_remote_uncache.go
index 369f2b3d4..77f3a2575 100644
--- a/weed/shell/command_remote_uncache.go
+++ b/weed/shell/command_remote_uncache.go
@@ -74,7 +74,7 @@ func (c *commandRemoteUncache) Do(args []string, commandEnv *CommandEnv, writer
// pull content from remote
if err = c.uncacheContentData(commandEnv, writer, util.FullPath(*dir), fileFiler); err != nil {
- return fmt.Errorf("cache content data: %v", err)
+ return fmt.Errorf("uncache content data: %v", err)
}
return nil
@@ -88,7 +88,7 @@ func (c *commandRemoteUncache) uncacheContentData(commandEnv *CommandEnv, writer
return true // true means recursive traversal should continue
}
- if fileFilter.matches(entry) {
+ if !fileFilter.matches(entry) {
return true
}
@@ -141,12 +141,12 @@ func newFileFilter(remoteMountCommand *flag.FlagSet) (ff *FileFilter) {
func (ff *FileFilter) matches(entry *filer_pb.Entry) bool {
if *ff.include != "" {
if ok, _ := filepath.Match(*ff.include, entry.Name); !ok {
- return true
+ return false
}
}
if *ff.exclude != "" {
if ok, _ := filepath.Match(*ff.exclude, entry.Name); ok {
- return true
+ return false
}
}
if *ff.minSize != -1 {
@@ -169,5 +169,5 @@ func (ff *FileFilter) matches(entry *filer_pb.Entry) bool {
return false
}
}
- return false
+ return true
}