From 502d0ff20db41279b66725b35edb6ce4dcbd9c4c Mon Sep 17 00:00:00 2001
From: Juan Diego Gonzalez <gojuan@vmware.com>
Date: Tue, 24 Aug 2021 20:19:00 +0000
Subject: [PATCH] Ran go get github.com/fsnotify/fsnotify

---
 go.mod                                        |   2 +-
 go.sum                                        |   2 +
 .../github.com/fsnotify/fsnotify/CHANGELOG.md | 107 ++++++++++--------
 vendor/github.com/fsnotify/fsnotify/README.md |  13 +--
 vendor/github.com/fsnotify/fsnotify/fen.go    |   4 +-
 .../github.com/fsnotify/fsnotify/fsnotify.go  |  17 ---
 vendor/github.com/fsnotify/fsnotify/go.mod    |   2 +
 .../github.com/fsnotify/fsnotify/inotify.go   |   6 +-
 vendor/github.com/fsnotify/fsnotify/kqueue.go |  32 +++++-
 .../github.com/fsnotify/fsnotify/windows.go   |   4 +-
 vendor/modules.txt                            |   2 +-
 11 files changed, 102 insertions(+), 89 deletions(-)

diff --git a/go.mod b/go.mod
index d2d1bd6bff5..452a56c3137 100644
--- a/go.mod
+++ b/go.mod
@@ -34,7 +34,7 @@ require (
 	github.com/elazarl/goproxy v0.0.0-20200809112317-0581fc3aee2d // indirect
 	github.com/elazarl/goproxy/ext v0.0.0-20200809112317-0581fc3aee2d // indirect
 	github.com/fatih/color v1.5.1-0.20170926111411-5df930a27be2
-	github.com/fsnotify/fsnotify v1.5.0 // indirect
+	github.com/fsnotify/fsnotify v1.5.1 // indirect
 	github.com/gogo/protobuf v1.3.1 // indirect
 	github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135
 	github.com/gorilla/websocket v1.2.1-0.20171201014301-b89020ee79b8 // indirect
diff --git a/go.sum b/go.sum
index 66a2368dcab..482dd452fe4 100644
--- a/go.sum
+++ b/go.sum
@@ -84,6 +84,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo
 github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
 github.com/fsnotify/fsnotify v1.5.0 h1:NO5hkcB+srp1x6QmwvNZLeaOgbM8cmBTN32THzjvu2k=
 github.com/fsnotify/fsnotify v1.5.0/go.mod h1:BX0DCEr5pT4jm2CnQdVP1lFV521fcCNcyEeNp4DQQDk=
+github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
+github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
 github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
index e2689213820..a438fe4b4a5 100644
--- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
+++ b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
@@ -1,6 +1,17 @@
 # Changelog
 
-## v1.5.0 / 2021-08-20
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [1.5.1] - 2021-08-24
+
+* Revert Add AddRaw to not follow symlinks
+
+## [1.5.0] - 2021-08-20
 
 * Go: Increase minimum required version to Go 1.12 [#381](https://github.com/fsnotify/fsnotify/pull/381)
 * Feature: Add AddRaw method which does not follow symlinks when adding a watch [#289](https://github.com/fsnotify/fsnotify/pull/298)
@@ -11,7 +22,7 @@
    [#385](https://github.com/fsnotify/fsnotify/pull/385)
 * Go 1.14+: Fix unsafe pointer conversion [#325](https://github.com/fsnotify/fsnotify/pull/325)
 
-## v1.4.7 / 2018-01-09
+## [1.4.7] - 2018-01-09
 
 * BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine)
 * Tests: Fix missing verb on format string (thanks @rchiossi)
@@ -21,62 +32,62 @@
 * Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich)
 * Docs: replace references to OS X with macOS
 
-## v1.4.2 / 2016-10-10
+## [1.4.2] - 2016-10-10
 
 * Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack)
 
-## v1.4.1 / 2016-10-04
+## [1.4.1] - 2016-10-04
 
 * Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack)
 
-## v1.4.0 / 2016-10-01
+## [1.4.0] - 2016-10-01
 
 * add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie)
 
-## v1.3.1 / 2016-06-28
+## [1.3.1] - 2016-06-28
 
 * Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc)
 
-## v1.3.0 / 2016-04-19
+## [1.3.0] - 2016-04-19
 
 * Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135)
 
-## v1.2.10 / 2016-03-02
+## [1.2.10] - 2016-03-02
 
 * Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj)
 
-## v1.2.9 / 2016-01-13
+## [1.2.9] - 2016-01-13
 
 kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep)
 
-## v1.2.8 / 2015-12-17
+## [1.2.8] - 2015-12-17
 
 * kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test)
 * inotify: fix race in test
 * enable race detection for continuous integration (Linux, Mac, Windows)
 
-## v1.2.5 / 2015-10-17
+## [1.2.5] - 2015-10-17
 
 * inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki)
 * inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken)
 * kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie)
 * kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion)
 
-## v1.2.1 / 2015-10-14
+## [1.2.1] - 2015-10-14
 
 * kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx)
 
-## v1.2.0 / 2015-02-08
+## [1.2.0] - 2015-02-08
 
 * inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD)
 * inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD)
 * kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59)
 
-## v1.1.1 / 2015-02-05
+## [1.1.1] - 2015-02-05
 
 * inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD)
 
-## v1.1.0 / 2014-12-12
+## [1.1.0] - 2014-12-12
 
 * kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43)
     * add low-level functions
@@ -88,22 +99,22 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn
 * kqueue: fix regression in  rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48)
 * kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
 
-## v1.0.4 / 2014-09-07
+## [1.0.4] - 2014-09-07
 
 * kqueue: add dragonfly to the build tags.
 * Rename source code files, rearrange code so exported APIs are at the top.
 * Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang)
 
-## v1.0.3 / 2014-08-19
+## [1.0.3] - 2014-08-19
 
 * [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36)
 
-## v1.0.2 / 2014-08-17
+## [1.0.2] - 2014-08-17
 
 * [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
 * [Fix] Make ./path and path equivalent. (thanks @zhsso)
 
-## v1.0.0 / 2014-08-15
+## [1.0.0] - 2014-08-15
 
 * [API] Remove AddWatch on Windows, use Add.
 * Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30)
@@ -157,51 +168,51 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn
     * no tests for the current implementation
     * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195)
 
-## v0.9.3 / 2014-12-31
+## [0.9.3] - 2014-12-31
 
 * kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
 
-## v0.9.2 / 2014-08-17
+## [0.9.2] - 2014-08-17
 
 * [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
 
-## v0.9.1 / 2014-06-12
+## [0.9.1] - 2014-06-12
 
 * Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98)
 
-## v0.9.0 / 2014-01-17
+## [0.9.0] - 2014-01-17
 
 * IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany)
 * [Fix] kqueue: fix deadlock [#77][] (thanks @cespare)
 * [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library.
 
-## v0.8.12 / 2013-11-13
+## [0.8.12] - 2013-11-13
 
 * [API] Remove FD_SET and friends from Linux adapter
 
-## v0.8.11 / 2013-11-02
+## [0.8.11] - 2013-11-02
 
 * [Doc] Add Changelog [#72][] (thanks @nathany)
 * [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond)
 
-## v0.8.10 / 2013-10-19
+## [0.8.10] - 2013-10-19
 
 * [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott)
 * [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer)
 * [Doc] specify OS-specific limits in README (thanks @debrando)
 
-## v0.8.9 / 2013-09-08
+## [0.8.9] - 2013-09-08
 
 * [Doc] Contributing (thanks @nathany)
 * [Doc] update package path in example code [#63][] (thanks @paulhammond)
 * [Doc] GoCI badge in README (Linux only) [#60][]
 * [Doc] Cross-platform testing with Vagrant  [#59][] (thanks @nathany)
 
-## v0.8.8 / 2013-06-17
+## [0.8.8] - 2013-06-17
 
 * [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie)
 
-## v0.8.7 / 2013-06-03
+## [0.8.7] - 2013-06-03
 
 * [API] Make syscall flags internal
 * [Fix] inotify: ignore event changes
@@ -209,74 +220,74 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn
 * [Fix] tests on Windows
 * lower case error messages
 
-## v0.8.6 / 2013-05-23
+## [0.8.6] - 2013-05-23
 
 * kqueue: Use EVT_ONLY flag on Darwin
 * [Doc] Update README with full example
 
-## v0.8.5 / 2013-05-09
+## [0.8.5] - 2013-05-09
 
 * [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg)
 
-## v0.8.4 / 2013-04-07
+## [0.8.4] - 2013-04-07
 
 * [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz)
 
-## v0.8.3 / 2013-03-13
+## [0.8.3] - 2013-03-13
 
 * [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin)
 * [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin)
 
-## v0.8.2 / 2013-02-07
+## [0.8.2] - 2013-02-07
 
 * [Doc] add Authors
 * [Fix] fix data races for map access [#29][] (thanks @fsouza)
 
-## v0.8.1 / 2013-01-09
+## [0.8.1] - 2013-01-09
 
 * [Fix] Windows path separators
 * [Doc] BSD License
 
-## v0.8.0 / 2012-11-09
+## [0.8.0] - 2012-11-09
 
 * kqueue: directory watching improvements (thanks @vmirage)
 * inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto)
 * [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr)
 
-## v0.7.4 / 2012-10-09
+## [0.7.4] - 2012-10-09
 
 * [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji)
 * [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig)
 * [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig)
 * [Fix] kqueue: modify after recreation of file
 
-## v0.7.3 / 2012-09-27
+## [0.7.3] - 2012-09-27
 
 * [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage)
 * [Fix] kqueue: no longer get duplicate CREATE events
 
-## v0.7.2 / 2012-09-01
+## [0.7.2] - 2012-09-01
 
 * kqueue: events for created directories
 
-## v0.7.1 / 2012-07-14
+## [0.7.1] - 2012-07-14
 
 * [Fix] for renaming files
 
-## v0.7.0 / 2012-07-02
+## [0.7.0] - 2012-07-02
 
 * [Feature] FSNotify flags
 * [Fix] inotify: Added file name back to event path
 
-## v0.6.0 / 2012-06-06
+## [0.6.0] - 2012-06-06
 
 * kqueue: watch files after directory created (thanks @tmc)
 
-## v0.5.1 / 2012-05-22
+## [0.5.1] - 2012-05-22
 
 * [Fix] inotify: remove all watches before Close()
 
-## v0.5.0 / 2012-05-03
+## [0.5.0] - 2012-05-03
 
 * [API] kqueue: return errors during watch instead of sending over channel
 * kqueue: match symlink behavior on Linux
@@ -284,22 +295,22 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn
 * [Fix] kqueue: handle EINTR (reported by @robfig)
 * [Doc] Godoc example [#1][] (thanks @davecheney)
 
-## v0.4.0 / 2012-03-30
+## [0.4.0] - 2012-03-30
 
 * Go 1 released: build with go tool
 * [Feature] Windows support using winfsnotify
 * Windows does not have attribute change notifications
 * Roll attribute notifications into IsModify
 
-## v0.3.0 / 2012-02-19
+## [0.3.0] - 2012-02-19
 
 * kqueue: add files when watch directory
 
-## v0.2.0 / 2011-12-30
+## [0.2.0] - 2011-12-30
 
 * update to latest Go weekly code
 
-## v0.1.0 / 2011-10-19
+## [0.1.0] - 2011-10-19
 
 * kqueue: add watch on file creation to match inotify
 * kqueue: create file event
diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md
index 670f2cfc263..df57b1b282c 100644
--- a/vendor/github.com/fsnotify/fsnotify/README.md
+++ b/vendor/github.com/fsnotify/fsnotify/README.md
@@ -72,18 +72,10 @@ func main() {
 		}
 	}()
 
-	// if this is a link, it will follow all the links and watch the file pointed to
 	err = watcher.Add("/tmp/foo")
 	if err != nil {
 		log.Fatal(err)
 	}
-
-	// this will watch the link, rather than the file it points to
-	err = watcher.AddRaw("/tmp/link")
-	if err != nil {
-		log.Fatal(err)
-	}
-
 	<-done
 }
 ```
@@ -98,10 +90,6 @@ See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_t
 
 ## FAQ
 
-**Are symlinks resolved?**
-Symlinks are implicitly resolved by [`filepath.EvalSymlinks(path)`](https://golang.org/pkg/path/filepath/#EvalSymlinks) when `watcher.Add(name)` is used. If that is not desired, you can use `watcher.AddRaw(name)` to not follow any symlinks before watching. See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).
-
-
 **When a file is moved to another directory is it still being watched?**
 
 No (it shouldn't be, unless you are watching where it was moved to).
@@ -139,3 +127,4 @@ fsnotify requires support from underlying OS to work. The current NFS protocol d
 
 * [notify](https://github.com/rjeczalik/notify)
 * [fsevents](https://github.com/fsnotify/fsevents)
+
diff --git a/vendor/github.com/fsnotify/fsnotify/fen.go b/vendor/github.com/fsnotify/fsnotify/fen.go
index 325ece593f3..b3ac3d8f55f 100644
--- a/vendor/github.com/fsnotify/fsnotify/fen.go
+++ b/vendor/github.com/fsnotify/fsnotify/fen.go
@@ -27,8 +27,8 @@ func (w *Watcher) Close() error {
 	return nil
 }
 
-// AddRaw starts watching the named file or directory (non-recursively). Symlinks are not implicitly resolved.
-func (w *Watcher) AddRaw(name string) error {
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
 	return nil
 }
 
diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go
index 5e240dc2a35..0f4ee52e8aa 100644
--- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go
+++ b/vendor/github.com/fsnotify/fsnotify/fsnotify.go
@@ -12,7 +12,6 @@ import (
 	"bytes"
 	"errors"
 	"fmt"
-	"path/filepath"
 )
 
 // Event represents a single file system notification.
@@ -68,19 +67,3 @@ func (e Event) String() string {
 var (
 	ErrEventOverflow = errors.New("fsnotify queue overflow")
 )
-
-// Add starts watching the named file or directory (non-recursively). Symlinks are implicitly resolved.
-func (w *Watcher) Add(name string) error {
-	rawPath, err := filepath.EvalSymlinks(name)
-	if err != nil {
-		return fmt.Errorf("error resolving %#v: %s", name, err)
-	}
-	err = w.AddRaw(rawPath)
-	if err != nil {
-		if name != rawPath {
-			return fmt.Errorf("error adding %#v for %#v: %s", rawPath, name, err)
-		}
-		return err
-	}
-	return nil
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/go.mod b/vendor/github.com/fsnotify/fsnotify/go.mod
index f37d2c03513..54089e48b7b 100644
--- a/vendor/github.com/fsnotify/fsnotify/go.mod
+++ b/vendor/github.com/fsnotify/fsnotify/go.mod
@@ -3,3 +3,5 @@ module github.com/fsnotify/fsnotify
 go 1.13
 
 require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
+
+retract v1.5.0
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify.go b/vendor/github.com/fsnotify/fsnotify/inotify.go
index 994daf091b2..eb87699b5b4 100644
--- a/vendor/github.com/fsnotify/fsnotify/inotify.go
+++ b/vendor/github.com/fsnotify/fsnotify/inotify.go
@@ -88,8 +88,8 @@ func (w *Watcher) Close() error {
 	return nil
 }
 
-// AddRaw starts watching the named file or directory (non-recursively). Symlinks are not implicitly resolved.
-func (w *Watcher) AddRaw(name string) error {
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
 	name = filepath.Clean(name)
 	if w.isClosed() {
 		return errors.New("inotify instance already closed")
@@ -97,7 +97,7 @@ func (w *Watcher) AddRaw(name string) error {
 
 	const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM |
 		unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY |
-		unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF | unix.IN_DONT_FOLLOW
+		unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF
 
 	var flags uint32 = agnosticEvents
 
diff --git a/vendor/github.com/fsnotify/fsnotify/kqueue.go b/vendor/github.com/fsnotify/fsnotify/kqueue.go
index caecacb51bb..368f5b790d4 100644
--- a/vendor/github.com/fsnotify/fsnotify/kqueue.go
+++ b/vendor/github.com/fsnotify/fsnotify/kqueue.go
@@ -91,8 +91,8 @@ func (w *Watcher) Close() error {
 	return nil
 }
 
-// AddRaw starts watching the named file or directory (non-recursively). Symlinks are not implicitly resolved.
-func (w *Watcher) AddRaw(name string) error {
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
 	w.mu.Lock()
 	w.externalWatches[name] = true
 	w.mu.Unlock()
@@ -190,7 +190,33 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) {
 			return "", nil
 		}
 
-		watchfd, err = unix.Open(name, openMode|unix.O_SYMLINK, 0700)
+		// Follow Symlinks
+		// Unfortunately, Linux can add bogus symlinks to watch list without
+		// issue, and Windows can't do symlinks period (AFAIK). To  maintain
+		// consistency, we will act like everything is fine. There will simply
+		// be no file events for broken symlinks.
+		// Hence the returns of nil on errors.
+		if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
+			name, err = filepath.EvalSymlinks(name)
+			if err != nil {
+				return "", nil
+			}
+
+			w.mu.Lock()
+			_, alreadyWatching = w.watches[name]
+			w.mu.Unlock()
+
+			if alreadyWatching {
+				return name, nil
+			}
+
+			fi, err = os.Lstat(name)
+			if err != nil {
+				return "", nil
+			}
+		}
+
+		watchfd, err = unix.Open(name, openMode, 0700)
 		if watchfd == -1 {
 			return "", err
 		}
diff --git a/vendor/github.com/fsnotify/fsnotify/windows.go b/vendor/github.com/fsnotify/fsnotify/windows.go
index 7dd51481669..c02b75f7c37 100644
--- a/vendor/github.com/fsnotify/fsnotify/windows.go
+++ b/vendor/github.com/fsnotify/fsnotify/windows.go
@@ -64,8 +64,8 @@ func (w *Watcher) Close() error {
 	return <-ch
 }
 
-// AddRaw starts watching the named file or directory (non-recursively). Symlinks are not implicitly resolved.
-func (w *Watcher) AddRaw(name string) error {
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
 	if w.isClosed {
 		return errors.New("watcher already closed")
 	}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index d3880966606..dccc972c10f 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -114,7 +114,7 @@ github.com/docker/docker/pkg/term/windows
 # github.com/fatih/color v1.5.1-0.20170926111411-5df930a27be2
 ## explicit
 github.com/fatih/color
-# github.com/fsnotify/fsnotify v1.5.0
+# github.com/fsnotify/fsnotify v1.5.1
 ## explicit
 github.com/fsnotify/fsnotify
 # github.com/gogo/protobuf v1.3.1