mount: rename also clear the cache

fix https://github.com/chrislusf/seaweedfs/issues/1182
This commit is contained in:
Chris Lu
2020-01-19 12:31:56 -08:00
parent 04019aa161
commit 2f15e93466
3 changed files with 14 additions and 6 deletions

View File

@@ -2,7 +2,6 @@ package filesys
import (
"context"
"path/filepath"
"github.com/chrislusf/seaweedfs/weed/filer2"
"github.com/chrislusf/seaweedfs/weed/glog"
@@ -110,7 +109,7 @@ func listxattr(entry *filer_pb.Entry, req *fuse.ListxattrRequest, resp *fuse.Lis
func (wfs *WFS) maybeLoadEntry(ctx context.Context, dir, name string) (entry *filer_pb.Entry, err error) {
fullpath := filepath.Join(dir, name)
fullpath := string(filer2.NewFullPath(dir, name))
item := wfs.listDirectoryEntriesCache.Get(fullpath)
if item != nil && !item.Expired() {
entry = item.Value().(*filer_pb.Entry)