Skip to content
New issue

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

I want to use ReadDirectoryChanges to watch subtree on windows. Do you have any ideas? #397

Closed
mstmdev opened this issue Sep 10, 2021 · 1 comment

Comments

@mstmdev
Copy link

mstmdev commented Sep 10, 2021

fsnotify/windows.go

Lines 351 to 352 in 466b39d

e := syscall.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0],
uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0)

Because when I add all of sub dir to Watcher, and try to remove the parent dir, it asked me for an administrators role.
So I try to changed ReadDirectoryChanges's watchSubTree by true, then it worked.

@arp242
Copy link
Member

arp242 commented Jul 30, 2022

This isn't supported yet; there's an open PR for it (#339), but it needs a bit more work.

It should (hopefully) be in the next release, but for now, you can use that PR with a replace directive in your go.mod if you want.

Closing as a duplicate of #21.

@arp242 arp242 closed this as completed Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants