Write directory history in another goroutine.

This commit is contained in:
Qi Xiao 2016-02-19 15:36:14 +01:00
parent 5f3f438193
commit 4b60877083

View File

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