Use Network.GetName for logs path
This commit is contained in:
parent
70f54f685a
commit
3680facb1d
@ -44,7 +44,7 @@ func (ml *messageLogger) Append(msg *irc.Message) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: handle/forbid network/entity names with illegal path characters
|
// TODO: handle/forbid network/entity names with illegal path characters
|
||||||
dir := filepath.Join(ml.conn.srv.LogPath, ml.conn.user.Username, ml.conn.network.Name, ml.entity)
|
dir := filepath.Join(ml.conn.srv.LogPath, ml.conn.user.Username, ml.conn.network.GetName(), ml.entity)
|
||||||
if err := os.MkdirAll(dir, 0700); err != nil {
|
if err := os.MkdirAll(dir, 0700); err != nil {
|
||||||
return fmt.Errorf("failed to create logs directory %q: %v", dir, err)
|
return fmt.Errorf("failed to create logs directory %q: %v", dir, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user