We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When removing symlink no events happens on MacOS. Also on linux it's working fine.
package main import ( "log" "github.com/fsnotify/fsnotify" ) func main() { // Create new watcher. watcher, err := fsnotify.NewWatcher() if err != nil { log.Fatal(err) } defer watcher.Close() // Start listening for events. go func() { for { select { case event, ok := <-watcher.Events: if !ok { return } log.Println("event:", event) if event.Has(fsnotify.Write) { log.Println("modified file:", event.Name) } case err, ok := <-watcher.Errors: if !ok { return } log.Println("error:", err) } } }() // Add a path. err = watcher.Add("./tmp") if err != nil { log.Fatal(err) } // Block main goroutine forever. <-make(chan struct{}) }
touch tmp/test.txt # event: CREATE "tmp/test.txt" ln -s tmp/test.txt tmp/link.txt # event: CREATE "tmp/link.txt" rm tmp/link.txt #
ProductName: macOS ProductVersion: 14.4.1 BuildVersion: 23E224
v1.7.0
Yes
The text was updated successfully, but these errors were encountered:
Yeah, it's been like this for ages, or at least for as long as I've been involved: https://github.com/fsnotify/fsnotify/blob/main/testdata/watch-dir/remove-symlink#L13
Doesn't seem to be an easy fix; I'll probably pick this up when I rewrite the kqueue backend to support recursion and some other features.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When removing symlink no events happens on MacOS. Also on linux it's working fine.
Code to Reproduce
File operations to reproduce
Which operating system and version are you using?
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224
Which fsnotify version are you using?
v1.7.0
Did you try the latest main branch?
Yes
The text was updated successfully, but these errors were encountered: