From: Chris Howey Date: Thu, 7 Feb 2013 02:55:39 +0000 (-0600) Subject: Fixed unlock for watching directory X-Git-Tag: v1.7.2~385 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=985502c9c3fca1349dd56ce81f50b4f842d3bb52;p=fsnotify.git Fixed unlock for watching directory --- diff --git a/fsnotify_bsd.go b/fsnotify_bsd.go index c3b9ca4..1c344f0 100644 --- a/fsnotify_bsd.go +++ b/fsnotify_bsd.go @@ -373,7 +373,7 @@ func (w *Watcher) watchDirectoryFiles(dirPath string) error { // we want to preserve the flags used w.enmut.Lock() currFlags, found := w.enFlags[filePath] - w.enmut.Lock() + w.enmut.Unlock() var newFlags uint32 = NOTE_DELETE if found { newFlags |= currFlags