diff options
| author | chrislu <chris.lu@gmail.com> | 2022-01-12 11:51:13 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-01-12 11:51:13 -0800 |
| commit | fec8428fd80feb1ac7bfa34f5775a442f4627433 (patch) | |
| tree | e6533e6bfe43e0ca768986341645d01021ec09dd /weed/filesys/wfs.go | |
| parent | e82ad60122a22ab72659fc86368e42f91c0e9e34 (diff) | |
| download | seaweedfs-fec8428fd80feb1ac7bfa34f5775a442f4627433.tar.xz seaweedfs-fec8428fd80feb1ac7bfa34f5775a442f4627433.zip | |
POSIX: different inode for same named different file types
Diffstat (limited to 'weed/filesys/wfs.go')
| -rw-r--r-- | weed/filesys/wfs.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 63b83f7ef..f6a6031d2 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -109,15 +109,15 @@ func NewSeaweedFileSystem(option *Option) *WFS { wfs.chunkCache = chunk_cache.NewTieredChunkCache(256, option.getUniqueCacheDir(), option.CacheSizeMB, 1024*1024) } - wfs.metaCache = meta_cache.NewMetaCache(path.Join(option.getUniqueCacheDir(), "meta"), util.FullPath(option.FilerMountRootPath), option.UidGidMapper, func(filePath util.FullPath, isDirectory bool) { + wfs.metaCache = meta_cache.NewMetaCache(path.Join(option.getUniqueCacheDir(), "meta"), util.FullPath(option.FilerMountRootPath), option.UidGidMapper, func(filePath util.FullPath, entry *filer_pb.Entry) { - fsNode := NodeWithId(filePath.AsInode(isDirectory)) + fsNode := NodeWithId(filePath.AsInode(entry.FileMode())) if err := wfs.Server.InvalidateNodeData(fsNode); err != nil { glog.V(4).Infof("InvalidateNodeData %s : %v", filePath, err) } dir, name := filePath.DirAndName() - parent := NodeWithId(util.FullPath(dir).AsInode(true)) + parent := NodeWithId(util.FullPath(dir).AsInode(os.ModeDir)) if dir == option.FilerMountRootPath { parent = NodeWithId(1) } |
