- When we see a link inside a directory the resolved version would get
added to w.watches etc. but the link won't, resulting in many spurious
create events for the link. This fixes #277; I'm surprised there
aren't more reports for this).
- filepath.EvalSymlinks() will resolve any symlinks in the entire path,
rather than just the link itself. This would cause paths such as:
/path/to/LINK/dir/dir/WATCH-THIS
To have the wrong Event.Name; many of the test cases failed because of
this because /tmp is a link to /private/tmp on macOS, but curiously no
one reported it AFAIK (I guess many people don't use symlinks all that
much).
Example:
% mkdir /tmp/xxx
% touch /tmp/xxx/FILE
% ln -s /tmp/xxx/LINK /tmp/xxx/FILE # 25 years of Unix experience, and still...
ln: /tmp/xxx/FILE: File exists
% ln -s /tmp/xxx/FILE /tmp/xxx/LINK
Before it would do:
% go run ./cmd/fsnotify watch /tmp/xxx &
% touch /tmp/xxx/FILE
03:23:03.2731 1 CHMOD "/private/tmp/xxx/FILE"
03:23:03.2744 2 CHMOD "/tmp/xxx/FILE"
^C