rjeczalik / notify

File system event notification library on steroids.
MIT License
900 stars 128 forks source link

"The parameter is incorrect." error when watching files on Windows #225

Open goodsky opened 6 months ago

goodsky commented 6 months ago

Trying to watch a file on Windows returns this error "The parameter is incorrect." A simple example that reproduces this issue.

root := "./test.txt" // this file exists
events := make(chan notify.EventInfo, 100)

if err := notify.Watch(root, events, notify.All); err != nil {
   log.Fatal(err)
}

I have my suspicion that this may be related to my Go installation or disk setup. I will continue to debug, but posting here in case someone else has seen this before.

ReallyLiri commented 6 months ago

I haven't seen such error on Windows, could it be permissions to the current directory? Did you try different paths?