watcher icon indicating copy to clipboard operation
watcher copied to clipboard

FileWatcher hangs when received an Event on a File which is deleted

Open shivakumargowda12 opened this issue 5 years ago • 1 comments

Hi, I have uploaded a sample go code which contains logic to handle different File Watcher events. Suppose, If I delete a File which is being watched already, the logic hangs while trying to Call Remove(path) function of watcher.go and never returns.

Requirement: To dynamically add/remove files to FileWatcher object during File Creation or Deletion inside a specific folder.

I have seen previous similar issues and workaround/solution for those issues. https://github.com/radovskyb/watcher/issues/22 https://github.com/radovskyb/watcher/issues/48

But wanted to know solution specific to my use case. Thanks FileWatcher.go.txt

shivakumargowda12 avatar Oct 22 '19 15:10 shivakumargowda12

@radovskyb , any solution to this issue. (Version: 1.0.7)

shivakumargowda12 avatar Oct 22 '19 15:10 shivakumargowda12