CC-3299: Media monitor should not change the owner of watched files

- it sets dir permission 02777 and file permission to 0666 if the path
is under "stor" dir, else it tries add world readable bit.
This commit is contained in:
James 2012-02-08 15:14:58 -05:00
parent 103b4abdeb
commit 5b47402ed0
2 changed files with 21 additions and 12 deletions

View file

@ -141,8 +141,10 @@ class AirtimeProcessEvent(ProcessEvent):
self.mmc.set_needed_file_permissions(pathname, dir)
def process_IN_MODIFY(self, event):
self.logger.info("process_IN_MODIFY: %s", event)
self.handle_modified_file(event.dir, event.pathname, event.name)
# if IN_MODIFY is followed by IN_CREATE, it's not true modify event
if not event.pathname in self.create_dict:
self.logger.info("process_IN_MODIFY: %s", event)
self.handle_modified_file(event.dir, event.pathname, event.name)
def handle_modified_file(self, dir, pathname, name):
# update timestamp on create_dict for the entry with pathname as the key