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

x/exp/inotify: inotify_linux RemoveWatch needs to delete reference to watch even if system returns error. #14685

Closed
jasonrichardsmith opened this issue Mar 7, 2016 · 1 comment

Comments

@jasonrichardsmith
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go 1.6
  2. What operating system and processor architecture are you using (go env)?
    amd64, Linux
  3. What did you do?
    in inotify_linux RemoveWatch does not remove from the registry of watches if Linux returns an error.

I notify returns an error if you need to stop watching a directory, as it should because it automatically removes directories, but you still need to remove the registry because if the directory gets added back you need a new watcher reference id.

  1. What did you expect to see?
    when a directory is removed and added back files within the directory should return the full path name
  2. What did you see instead?
    If a directory is removed and added just the file name with no path is returned for the Event.Name

The delete function just needs to be moved
Fix can be found here:
jasonrichardsmith/exp@6d6db11

@bradfitz bradfitz changed the title Inotify_linux RemoveWatch needs to delete reference to watch even if system returns error. x/exp/inotify: inotify_linux RemoveWatch needs to delete reference to watch even if system returns error. Mar 7, 2016
@bradfitz bradfitz added this to the Unreleased milestone Mar 7, 2016
@rsc
Copy link
Contributor

rsc commented Oct 6, 2016

Deleted this code instead. See github.com/fsnotify for more maintained code.

@rsc rsc closed this as completed Oct 6, 2016
@golang golang locked and limited conversation to collaborators Oct 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants