openStore: use sess.id instead of captured variable
This commit is contained in:
parent
35e7b98e22
commit
06ddf36de3
|
|
@ -436,12 +436,11 @@ func (s *Manager) OpenStore(id string) (*fs.Tree, error) {
|
|||
}
|
||||
|
||||
func (s *Manager) openStore(sess *Session) (*fs.Tree, error) {
|
||||
id := sess.RunnableID()
|
||||
return NewSessionTree(
|
||||
sess,
|
||||
s.cfg.Log,
|
||||
func() { s.KillSession(id) },
|
||||
func(newID string) error { return s.renameSession(id, newID) },
|
||||
func() { s.KillSession(sess.id) },
|
||||
func(newID string) error { return s.renameSession(sess.id, newID) },
|
||||
s.cfg.SaveTranscript,
|
||||
), nil
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue