Config impl watches for create *and* write

Editing config files with things like gedit work now
This commit is contained in:
Sasha Koshka 2024-08-28 00:56:40 -04:00
parent 2aea7764d3
commit 545d553d1a

View File

@ -65,7 +65,7 @@ func NewConfig (user string, system ...string) (ConfigCloser, error) {
func (this *config) lockAndProcessEvent (event fsnotify.Event) {
this.lock.Lock()
defer this.lock.Unlock()
if !(event.Has(fsnotify.Write)) { return }
if !(event.Has(fsnotify.Write | fsnotify.Create)) { return }
if _, ok := this.paths.watching[event.Name]; !ok { return }
if event.Name == this.paths.user {