Use Network.GetName for logs path

This commit is contained in:
Simon Ser 2020-04-05 15:24:57 +02:00
parent 70f54f685a
commit 3680facb1d
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 1 deletions

View File

@ -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)
} }