diff options
Diffstat (limited to 'weed/filer')
| -rw-r--r-- | weed/filer/filer_conf.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go index acd1c6ecf..1229f0139 100644 --- a/weed/filer/filer_conf.go +++ b/weed/filer/filer_conf.go @@ -159,16 +159,15 @@ func mergePathConf(a, b *filer_pb.FilerConf_PathConf) { a.Collection = util.Nvl(b.Collection, a.Collection) a.Replication = util.Nvl(b.Replication, a.Replication) a.Ttl = util.Nvl(b.Ttl, a.Ttl) - if b.DiskType != "" { - a.DiskType = b.DiskType - } + a.DiskType = util.Nvl(b.DiskType, a.DiskType) a.Fsync = b.Fsync || a.Fsync if b.VolumeGrowthCount > 0 { a.VolumeGrowthCount = b.VolumeGrowthCount } - if b.ReadOnly { - a.ReadOnly = b.ReadOnly - } + a.ReadOnly = b.ReadOnly || a.ReadOnly + a.DataCenter = util.Nvl(b.DataCenter, a.DataCenter) + a.Rack = util.Nvl(b.Rack, a.Rack) + a.DataNode = util.Nvl(b.DataNode, a.DataNode) } func (fc *FilerConf) ToProto() *filer_pb.FilerConf { |
