update cache if updating the attributes
This commit is contained in:
@@ -337,6 +337,8 @@ func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fus
|
|||||||
dir.attributes.Mtime = req.Mtime.Unix()
|
dir.attributes.Mtime = req.Mtime.Unix()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
|
||||||
|
|
||||||
parentDir, name := filer2.FullPath(dir.Path).DirAndName()
|
parentDir, name := filer2.FullPath(dir.Path).DirAndName()
|
||||||
return dir.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
return dir.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||||
|
|
||||||
@@ -355,8 +357,6 @@ func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fus
|
|||||||
return fuse.EIO
|
return fuse.EIO
|
||||||
}
|
}
|
||||||
|
|
||||||
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file.wfs.listDirectoryEntriesCache.Delete(file.fullpath())
|
||||||
|
|
||||||
return file.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
return file.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||||
|
|
||||||
request := &filer_pb.UpdateEntryRequest{
|
request := &filer_pb.UpdateEntryRequest{
|
||||||
|
|||||||
Reference in New Issue
Block a user