]> go.fuhry.dev Git - fsnotify.git/commit
Fixed symlink notifications on Linux
authorTudor Golubenco <tudor.g@gmail.com>
Thu, 9 May 2013 16:55:29 +0000 (16:55 +0000)
committerTudor Golubenco <tudor.g@gmail.com>
Thu, 9 May 2013 16:55:29 +0000 (16:55 +0000)
commit671de6224cc0e92eecc9bc77068d7e6ee53d14f5
tree73f4ddbf053ea9c91108c3a7b14db743c28e65ce
parentb77e77b0b82fb0e6baa073df278ccfe898976447
Fixed symlink notifications on Linux

The linux code used to ignore events on the files that os.Stat reports as
non existing. This ignores the CREATEion of broken links, but monitoring
those can be useful, for example /proc/<pid>/fd/ contains fake links
for all sockets.

The patch simply replaces os.Stat with os.Lstat to solve the issue.

I updated the fsnotify_symlink_test.go to what I consider the correct
behavior but unfortunately couldn't test under windows, so I'm not sure
if it breaks the test there or not.
fsnotify_linux.go
fsnotify_symlink_test.go