mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
Write directory history in another goroutine.
This commit is contained in:
parent
5f3f438193
commit
4b60877083
|
@ -365,10 +365,11 @@ func cdInner(dir string, ec *EvalCtx) {
|
|||
throw(err)
|
||||
}
|
||||
if ec.store != nil {
|
||||
// XXX Error ignored.
|
||||
pwd, err := os.Getwd()
|
||||
// BUG(xiaq): Possible error of os.Getwd after cd-ing is ignored.
|
||||
if err == nil {
|
||||
ec.store.AddDir(pwd)
|
||||
// XXX Error ignored.
|
||||
go ec.store.AddDir(pwd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user