]> go.fuhry.dev Git - fsnotify.git/commitdiff
Fixed unlock for watching directory
authorChris Howey <chris@howey.me>
Thu, 7 Feb 2013 02:55:39 +0000 (20:55 -0600)
committerChris Howey <chris@howey.me>
Thu, 7 Feb 2013 02:55:39 +0000 (20:55 -0600)
fsnotify_bsd.go

index c3b9ca47ad559ccf76b156221e4ce658ae0746e0..1c344f016071305049ed148703d9efc425d4b6a0 100644 (file)
@@ -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