mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-07-07 01:27:01 +02:00
mount: avoid showing "topics" folder
fix https://github.com/chrislusf/seaweedfs/issues/1325
This commit is contained in:
parent
698f58f7c4
commit
d0826c2f62
|
@ -19,6 +19,9 @@ func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.Full
|
||||||
util.Retry("ReadDirAllEntries", func() error {
|
util.Retry("ReadDirAllEntries", func() error {
|
||||||
err = filer_pb.ReadDirAllEntries(client, dirPath, "", func(pbEntry *filer_pb.Entry, isLast bool) error {
|
err = filer_pb.ReadDirAllEntries(client, dirPath, "", func(pbEntry *filer_pb.Entry, isLast bool) error {
|
||||||
entry := filer.FromPbEntry(string(dirPath), pbEntry)
|
entry := filer.FromPbEntry(string(dirPath), pbEntry)
|
||||||
|
if IsHiddenSystemEntry(string(dirPath), entry.Name()) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if err := mc.doInsertEntry(context.Background(), entry); err != nil {
|
if err := mc.doInsertEntry(context.Background(), entry); err != nil {
|
||||||
glog.V(0).Infof("read %s: %v", entry.FullPath, err)
|
glog.V(0).Infof("read %s: %v", entry.FullPath, err)
|
||||||
return err
|
return err
|
||||||
|
@ -38,3 +41,7 @@ func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.Full
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IsHiddenSystemEntry(dir, name string) bool {
|
||||||
|
return dir == "/" && name == "topics"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue