moved to better jinetd setup
[org.ibex.jinetd.git] / src / org / ibex / jinetd / Watched.java
index 5d280c6..197f7dd 100644 (file)
@@ -28,11 +28,15 @@ public class Watched extends File {
         String[] kids = list();        
         if (kids == null) return;
         for(int i=0; i<kids.length; i++) {
-            if (cache.get(kids[i]) != null) continue;
-            Watched kid = slash(kids[i]);
-            if (kid == null) continue;
-            cache.put(kids[i], kid);
-            watcher().changed(kid);
+            Watched kid = (Watched)cache.get(kids[i]);
+            if (kid == null) {
+                kid = slash(kids[i]);
+                if (kid == null) continue;
+                cache.put(kids[i], kid);
+                watcher().changed(kid);
+            } else {
+                kid.scan();
+            }
         }
     }