nelsam / vidar

vidar is a highly experimental Go editor, written in Go, using gxui
The Unlicense
50 stars 7 forks source link

Add lock for loadDirContents #134

Closed Kvaz1r closed 6 years ago

Kvaz1r commented 6 years ago

After quick clicking on backspace when open file I got report in race log, it's fix for it.

Write at 0x00c0422e4320 by goroutine 103: github.com/nelsam/vidar/command/fs.(*Locator).loadDirContents() E:/gopath/src/github.com/nelsam/vidar/command/fs/locator.go:284 +0x99

Previous write at 0x00c0422e4320 by goroutine 104: github.com/nelsam/vidar/command/fs.(*Locator).loadDirContents() E:/gopath/src/github.com/nelsam/vidar/command/fs/locator.go:303 +0x301

Type

Tests

I have tested locally against:

I have included automated tests: