Author: dmeyer
Date: Fri Apr 21 18:54:47 2006
New Revision: 1436

Modified:
   trunk/beacon/src/crawl.py

Log:
also check parent on create and delete

Modified: trunk/beacon/src/crawl.py
==============================================================================
--- trunk/beacon/src/crawl.py   (original)
+++ trunk/beacon/src/crawl.py   Fri Apr 21 18:54:47 2006
@@ -137,8 +137,18 @@
             # a timer is already active and we can return. It still uses too 
much
             # CPU time in the burst, but there is nothing we can do about it.
             return True
-        
+
         item = self.db.query(filename=name)
+
+        if mask & INotify.CREATE or mask & INotify.DELETE:
+            # directory changed, too
+            parent = item._beacon_parent
+            for i in self.check_mtime_items:
+                if i.filename == parent.filename:
+                    break
+            else:
+                self.check_mtime_items.append(parent)
+                
         if os.path.exists(name):
             # The file exists. So it is either created or modified, we don't 
care
             # right now. Later it would be nice to check in detail about 
MOVE_MASK.
@@ -192,6 +202,10 @@
                     self.inotify.ignore(m)
                     log.info('remove inotify for %s', m)
                 self.monitoring.remove(m)
+        if self.check_mtime_items and not self.timer:
+            # check directory for modifications
+            Crawler.active += 1
+            self.check_mtime()
         return True
 
 


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to