joh / when-changed

Execute a command when a file is changed
Other
1.21k stars 107 forks source link

Deleted files do not trigger action when watching a directory. #58

Closed ronzil closed 5 years ago

ronzil commented 7 years ago

creating of a new file triggers the action, so it makes sense that deleting a file would do that also.

eviweb commented 5 years ago

Hi, I also think it is a good idea, but it implies to distinguish an event from others. Maybe should it be addressed by setting an environment variable as it was suggested in issue #64 and PR #72 for what have changed, eg. WHEN_CHANGED_EVENT. If you are OK with this idea, I should be able to work on it soon.

eviweb commented 5 years ago

Should be closed as it was solved by #75

edugsdf commented 5 years ago

I am also experiencing this difficulty.

When I start, and execute the file change it executes the command correctly. But from the second change, which is to delete the file and copy it back to the same directory, it does not execute.

Can someone help me please?