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

create and modify #9

Open
fabioce opened this issue Jul 26, 2015 · 2 comments
Open

create and modify #9

fabioce opened this issue Jul 26, 2015 · 2 comments

Comments

@fabioce
Copy link

fabioce commented Jul 26, 2015

Hello,
I noticed that :

if I create a new file in the monitored folder the watcher send me two event
create
modify

Why?

@marlemion
Copy link

I can confirm this. When I exclusively enable 'write_close' in the config file, I get two events when I copy or create a file: create and write_close. I want to trigger write_close only. I skimmed through the code and either the problem occurs during gathering the events via masks or within pynotify.

@marlemion
Copy link

I dug into this a little bit deeper and there is something completely wrong. I let watcher output event.maskname for every event it processed. Remember: in my case it processed a CREATE event and a WRITE_CLOSE event even if I required only WRITE_CLOSE. Look at the following:

Jan 12 18:11:43 nsa310 python2[12827]: Filme_create: Creating: /mnt/usbdisk/Filme/mama: IN_CREATE
Jan 12 18:11:43 nsa310 python2[12827]: Filme_close: Creating: /mnt/usbdisk/Filme/mama: IN_CREATE
Jan 12 18:11:43 nsa310 python2[12827]: Filme_close: Close write: /mnt/usbdisk/Filme/mama

Filme_create is a section configured to be triggered at CREATE. Filme_close to be triggered at WRITE_CLOSE. So Filme_create works correctly. It is triggered on a create event and this is shown in the output. However, Filme_close is triggered on a create event when it shouldn't and for the second triger, which should be the WRITE_CLOSE, it does not report any trigger maskname. Smells very fishy to me. Apparently it worked before for most of the people because most of them are interested in CREATE only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants