forked from External/ergo
fix #1751
RENAME (channel rename) that was a simple case change (e.g. renaming #chan to #CHAN) would delete the channel :-|
This commit is contained in:
parent
a09ea9a506
commit
c55d861a72
1 changed files with 5 additions and 3 deletions
|
|
@ -320,9 +320,11 @@ func (cm *ChannelManager) Rename(name string, newName string) (err error) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if channel != nil && info.Founder != "" {
|
if channel != nil && info.Founder != "" {
|
||||||
channel.Store(IncludeAllAttrs)
|
channel.Store(IncludeAllAttrs)
|
||||||
// we just flushed the channel under its new name, therefore this delete
|
if oldCfname != newCfname {
|
||||||
// cannot be overwritten by a write to the old name:
|
// we just flushed the channel under its new name, therefore this delete
|
||||||
cm.server.channelRegistry.Delete(info)
|
// cannot be overwritten by a write to the old name:
|
||||||
|
cm.server.channelRegistry.Delete(info)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue